some backports from trunk (untested)
authorFelix Fietkau <nbd@openwrt.org>
Fri, 7 Sep 2007 20:57:08 +0000 (20:57 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 7 Sep 2007 20:57:08 +0000 (20:57 +0000)
SVN-Revision: 8682

65 files changed:
docs/Makefile
docs/adding.tex
docs/build.tex
docs/config.tex
docs/network.tex
docs/wireless.tex
include/prereq-build.mk
include/prereq.mk
package/base-files/Makefile
package/base-files/files/bin/firstboot
package/base-files/files/etc/functions.sh
package/base-files/files/etc/hotplug.d/iface/00-netstate
package/base-files/files/etc/ipkg.conf
package/base-files/files/lib/config/uci.sh
package/base-files/files/lib/network/config.sh
package/base-files/files/sbin/wifi
package/broadcom-diag/Makefile
package/broadcom-diag/src/diag.c
package/broadcom-diag/src/diag.h
package/dnsmasq/Makefile
package/dnsmasq/files/dnsmasq.init
package/dnsmasq/patches/101-ipv6.patch
package/dnsmasq/patches/102-rtnetlink.patch
package/dnsmasq/patches/103-hosts-fqdn.patch [deleted file]
package/dropbear/Makefile
package/dropbear/patches/100-pubkey_path.patch
package/dropbear/patches/110-change_user.patch
package/dropbear/patches/120-hostkey_prompt.patch [deleted file]
package/dropbear/patches/130-ssh_ignore_o_and_x_args.patch
package/dropbear/patches/140-use_dev_urandom.patch [deleted file]
package/dropbear/patches/150-dbconvert_standalone.patch
package/dropbear/patches/160-tty_close.patch
package/ebtables/Makefile
package/hotplug2/Makefile
package/hotplug2/files/hotplug2.rules
package/keynote/Makefile
package/madwifi/Makefile
package/madwifi/files/lib/wifi/madwifi.sh
package/madwifi/patches/131-minstrel_rateidx.patch [new file with mode: 0644]
package/madwifi/patches/306-bstuck_calibrate.patch [deleted file]
package/madwifi/patches/306-mib_intr_workaround.patch [new file with mode: 0644]
package/ppp/Makefile
package/ppp/files/ppp.sh
package/ppp/files/pppoe.sh
package/pptp/Makefile
package/pptp/files/pptp.sh
package/qos-scripts/Makefile
package/qos-scripts/files/usr/lib/qos/generate.sh
package/rt61/Makefile
package/rt61/patches/002-big_endian_fixes.patch [new file with mode: 0644]
package/strongswan/Makefile
package/strongswan/files/ipsec.iface
package/wlcompat/Makefile
package/wlcompat/src/wlcompat.c
package/zlib/Makefile
scripts/config.pl
scripts/download.pl
scripts/slugimage.pl
scripts/timestamp.pl
target/linux/brcm-2.4/base-files/default/etc/init.d/netconfig
target/linux/brcm-2.4/files/arch/mips/bcm947xx/time.c
target/linux/generic-2.6/patches-2.6.22/065-block2mtd_init.patch
target/linux/generic-2.6/patches/065-block2mtd_init.patch
target/linux/rb532-2.6/files/arch/mips/rb500/prom.c.orig [deleted file]
tools/ipkg-utils/patches/150-uppercase_letters.patch [new file with mode: 0644]

index 82381e316995724968ef83b8ec1001a8d2535cd3..f6caa826030da721a568ac5efef0eed87b18cabe 100644 (file)
@@ -2,13 +2,15 @@ ifeq ($(TOPDIR),)
   TOPDIR:=${CURDIR}/..
 endif
 
+all: compile
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/prereq.mk
 
 MAIN = openwrt.tex
 DEPS = $(MAIN) Makefile config.tex network.tex network-scripts.tex network-scripts.tex wireless.tex build.tex adding.tex bugs.tex $(TMP_DIR)/.prereq-docs
 
-all:
+compile:
        $(NO_TRACE_MAKE) cleanup
        latex $(MAIN)
        $(NO_TRACE_MAKE) openwrt.pdf openwrt.html
@@ -30,6 +32,9 @@ clean: cleanup
 cleanup: FORCE
        rm -f *.log *.aux *.toc *.out *.lg *.dvi *.idv *.4ct *.4tc *.xref *.tmp *.dvi
 
+$(eval $(call RequireCommand,latex, \
+       You need to install LaTeX to build the OpenWrt documentation \
+))
 $(eval $(call RequireCommand,pdflatex, \
        You need to install LaTeX to build the OpenWrt documentation \
 ))
index b1712ac9d26ac558737632598acdbba2437dc190..2b47e6a328a96e0963b6ef96c8cd71d4adc1e173 100644 (file)
@@ -357,7 +357,7 @@ firmware image and flash is structured. You will find below a commented example
 that covers the case of the device where the bootloader can pass to the kernel its partition plan.
 
 First of all, you need to make your flash map driver be visible in the kernel 
-configuration options, this can be done by editing the file 
+configuration options, this can be done by editing the file \
 \textbf{linux/drivers/mtd/maps/Kconfig}:
 
 \begin{verbatim}
index 03bd1a967585078c29ba4e11435b34486cb433f7..fd5f075d5bc3cb57b6f97dddb58285e6210635ab 100644 (file)
@@ -202,12 +202,6 @@ simplifies the entire ordeal.
 Here for example, is \texttt{package/bridge/Makefile}:
 
 \begin{Verbatim}[frame=single,numbers=left]
-#
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 # $Id: Makefile 5624 2006-11-23 00:29:07Z nbd $
 
 include $(TOPDIR)/rules.mk
@@ -229,12 +223,14 @@ define Package/bridge
   SECTION:=net
   CATEGORY:=Base system
   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 Package/bridge/description
+  Manage ethernet bridging: 
+  a way to connect networks together to form a larger network.
+endef
+
 define Build/Configure
     $(call Build/Configure/Default, \
         --with-linux-headers="$(LINUX_DIR)" \
@@ -384,12 +380,6 @@ For external kernel modules, you can add them to the build system just like if t
 Here for instance the Makefile for the I2C subsytem kernel modules :
 
 \begin{Verbatim}[frame=single,numbers=left]
-#
-# Copyright (C) 2006 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
 # $Id $
 
 I2CMENU:=I2C Bus
index f3802198edabcb5fb0723d216d96648760ac2716..17417c99a1c2574aeac1d57397ffeade81f7c04a 100644 (file)
@@ -57,12 +57,28 @@ after \texttt{config\_load} is done.
 That allows you to process sections both before and after all options were
 processed.
 
+Another way of iterating on config sections is using the \texttt{config\_foreach} command.
+
+Syntax:
+\begin{Verbatim}
+config_foreach <function name> [<sectiontype>] [<arguments...>]
+\end{Verbatim}
+
+This command will run the supplied function for every single config section in the currently
+loaded config. The section name will be passed to the function as argument 1.
+If the section type is added to the command line, the function will only be called for
+sections of the given type.
+
+
 You can access already processed options with the \texttt{config\_get} command
 Syntax:
 
 \begin{Verbatim}
-config_get <section> <option>            # prints the value of the option
-config_get <variable> <section> <option> # stores the value inside the variable
+# print the value of the option
+config_get <section> <option>
+
+# store the value inside the variable
+config_get <variable> <section> <option>
 \end{Verbatim}
 
 In busybox ash the three-option \texttt{config\_get} is faster, because it does not
@@ -77,3 +93,9 @@ Syntax:
 config_set <section> <option> <value>
 \end{Verbatim}
 
+If a config section is unnamed, an automatically generated name will
+be assigned internally, e.g. \texttt{cfg1}, \texttt{cfg2}, ...
+
+While it is possible, using unnamed sections through these autogenerated names is
+strongly discouraged. Use callbacks or \texttt{config\_foreach} instead.
+
index 7d811ba7f556ab6c461c6e98ae947be9ad41778d..df67eed714d2f874bec8c799f64ffc8cfa29d2a2 100644 (file)
@@ -31,6 +31,8 @@ packages.
 
 When using the \texttt{'static'} method like in the example, the  options \texttt{ipaddr} and
 \texttt{netmask} are mandatory, while \texttt{gateway} and \texttt{dns} are optional.
+You can specify more than one DNS server, separated with spaces.
+
 DHCP currently only accepts \texttt{ipaddr} (IP address to request from the server)
 and \texttt{hostname} (client hostname identify as) - both are optional.
 
@@ -102,3 +104,13 @@ As value it takes a list of ports with these optional suffixes:
 The CPU port defaults to tagged, all other ports to untagged.
 On Broadcom hardware the CPU port is always 5. The other ports may vary with
 different hardware.
+
+For instance, if you wish to have 3 vlans, like one 3-port switch, 1 port in a
+DMZ, and another one as your WAN interface, use the following configuration :
+
+\begin{Verbatim}
+config switch       "eth0"
+    option vlan0    "1 2 3 5*"
+    option vlan1    "0 5"
+    option vlan2    "4 5"
+\end{Verbatim}
index e6a81b8402fba537f0cc34779edc9fab7e4b5998..5734fc093b20157cb8e08286d6901445f3afa48c 100644 (file)
@@ -3,6 +3,12 @@ The WiFi settings are configured in the file \texttt{/etc/config/wireless}
 it should detect your card and create a sample configuration file. By default '\texttt{option network  lan}' is
 commented. This prevents unsecured sharing of the network over the wireless interface.
 
+Each wireless driver has its own configuration script in \texttt{/lib/wifi/driver\_name.sh} which handles
+driver specific options and configurations. This script is also calling driver specific binaries like wlc for
+Broadcom, or hostapd and wpa\_supplicant for atheros.
+
+The reason for using such architecture, is that it abstracts the driver configuration 
+
 \paragraph{Generic Broadcom wireless config:}
 
 \begin{Verbatim}
@@ -25,7 +31,7 @@ config wifi-iface
 config wifi-device      "wifi0"
     option type         "atheros"
     option channel      "5"
-    option mode        "11g"
+    option agmode      "11g"
 
 config wifi-iface
     option device       "wifi0"
@@ -36,7 +42,7 @@ config wifi-iface
     option encryption   "none"
 \end{Verbatim}
 
-\paragraph{Generic multi-radio Atheros wireless conifg:}
+\paragraph{Generic multi-radio Atheros wireless config:}
 
 \begin{Verbatim}
 config wifi-device  wifi0
@@ -77,7 +83,7 @@ config wifi-device     wifi device name
     option channel  1-14
     option maxassoc 1-128 (broadcom only)
     option distance 1-n
-    option mode     11b, 11g, 11a, 11bg (atheros only)
+    option agmode     11b, 11g, 11a, 11bg (atheros only)
 
 config wifi-iface
     option network  the interface you want wifi to bridge with 
@@ -210,3 +216,103 @@ Only the following mode combinations are supported:
             \item 1x \texttt{adhoc}
         \end{itemize}
 \end{itemize}
+
+\paragraph{Adding a new driver configuration}
+
+Since we currently only support two different wireless drivers : Broadcom and Atheros,
+you might be interested in adding support for another driver like Ralink RT2x00, 
+Texas Instruments ACX100/111.
+
+The driver specific script should be placed in \texttt{/lib/wifi/<driver>.sh} and has to
+include several functions providing :
+
+\begin{itemize}
+       \item detection of the driver presence
+       \item enabling/disabling the wifi interface(s)
+       \item configuration reading and setting
+       \item third-party programs calling (nas, supplicant)
+\end{itemize}
+
+Each driver script should append the driver to a global DRIVERS variable :
+
+\begin{Verbatim}
+append DRIVERS "driver name"
+\end{Verbatim}
+
+\subparagraph{\texttt{scan\_<driver>}}
+
+This function will parse the \texttt{/etc/config/wireless} and make sure there
+are no configuration incompatibilities, like enabling hidden SSIDS with ad-hoc mode
+for instance. This can be more complex if your driver supports a lof of configuration
+options. It does not change the state of the interface.
+
+Example:
+\begin{Verbatim}
+scan_dummy() {
+       local device="$1"
+
+       config_get vifs "$device" vifs
+       for vif in $vifs; do
+               # check config consistency for wifi-iface sections
+       done
+       # check mode combination
+}
+\end{Verbatim}
+
+\subparagraph{\texttt{enable\_<driver>}}
+
+This function will bring up the wifi device and optionally create application specific
+configuration files, e.g. for the WPA authenticator or supplicant.
+
+Example:
+\begin{Verbatim}
+enable_dummy() {
+       local device="$1"
+
+       config_get vifs "$device" vifs
+       for vif in $vifs; do
+               # bring up virtual interface belonging to
+               # the wifi-device "$device"
+       done
+}
+\end{Verbatim}
+
+\subparagraph{\texttt{disable\_<driver>}}
+
+This function will bring down the wifi device and all its virtual interfaces (if supported).
+
+Example:
+\begin{Verbatim}
+disable_dummy() {
+       local device="$1"
+
+       # bring down virtual interfaces belonging to
+       # "$device" regardless of whether they are
+       # configured or not. Don't rely on the vifs
+       # variable at this point
+}
+\end{Verbatim}
+
+\subparagraph{\texttt{detect\_<driver>}}
+
+This function looks for interfaces that are usable with the driver. Template config sections
+for new devices should be written to stdout. Must check for already existing config sections
+belonging to the interfaces before creating new templates.
+
+Example:
+\begin{Verbatim}
+detect_dummy() {
+       [ wifi-device = "$(config_get dummydev type)" ] && return 0
+       cat <<EOF
+config wifi-device dummydev
+       option type dummy
+       # REMOVE THIS LINE TO ENABLE WIFI:
+       option disabled 1
+
+config wifi-iface
+       option device dummydev
+       option mode ap
+       option ssid OpenWrt
+EOF
+}
+\end{Verbatim}
index 6311e601ba46410bad706961fdac380adc12d81d..c31020c3211d528acca14d8d4a1a233652dfb1d6 100644 (file)
@@ -52,7 +52,8 @@ $(eval $(call Require,working-gcc, \
 
 define Require/working-g++
        echo 'int main(int argc, char **argv) { return 0; }' | \
-               g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ -
+               g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ - && \
+               $(TMP_DIR)/a.out
 endef
 
 $(eval $(call Require,working-g++, \
index 8a08be8e68c9f4d34b0b8085c99ab01602bd21f5..8e5490ccff80161233cc76bede40f16f0e22d696 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2007 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -47,3 +47,12 @@ define RequireCommand
   $$(eval $$(call Require,$(1),$(2)))
 endef
 
+define RequireHeader
+  define Require/$(1)
+    [ -e "$(1)" ]
+  endef
+  
+  $$(eval $$(call Require,$(1),$(2)))
+endef
+
+.NOTPARALLEL:
index 64c3ead2047dccbef385370bf6e21c40ac9bdf3e..b79e90455c8080d5eb32de8a4d44fba745be0110 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
 PKG_FILE_DEPEND:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
index 5c11623b488957a96ca22cce4279e32824871aa2..ad87f7482e52623fd0f77aa5b7cf87cd84db77f7 100755 (executable)
@@ -49,7 +49,7 @@ pivot() { # <new_root> <old_root>
 fopivot() { # <rw_root> <ro_root> <dupe?>
        root=$1
        {
-               mount -t mini_fo -o base=/,sto=$1 $1 /mnt 2>&- && root=/mnt
+               mount -t mini_fo -o base=/,sto=$1 "mini_fo:$1" /mnt 2>&- && root=/mnt
        } || {
                [ "$3" = "1" ] && {
                mount | grep "on $1 type" 2>&- 1>&- || mount -o bind $1 $1
index 24c6826870ee1de00ebeece4115d3d8043d259e0..a613e1190b0423818747a6dd8f0f7b8db53b7cd3 100755 (executable)
@@ -85,19 +85,32 @@ config_clear() {
 }
 
 config_load() {
-       local file
-       case "$1" in
-               /*) file="$1";;
-               *) file="$UCI_ROOT/etc/config/$1";;
+       local cfg
+       local uci
+       local PACKAGE="$1"
+
+       case "$PACKAGE" in
+               /*)     cfg="$PACKAGE"
+                       uci=""
+               ;;
+               *)      cfg="$UCI_ROOT/etc/config/$PACKAGE"
+                       uci="/tmp/.uci/${PACKAGE}"
+               ;;
        esac
+
+       [ -e "$cfg" ] || cfg=""
+       [ -e "$uci" ] || uci=""
+
+       # no config
+       [ -z "$cfg" -a -z "$uci" ] && return 1
+
        _C=0
        export ${NO_EXPORT:+-n} CONFIG_SECTIONS=
        export ${NO_EXPORT:+-n} CONFIG_NUM_SECTIONS=0
        export ${NO_EXPORT:+-n} CONFIG_SECTION=
-       
-       [ -e "$file" ] && {
-               . $file
-       } || return 1
+
+       ${cfg:+. "$cfg"}
+       ${uci:+. "$uci"}
        
        ${CONFIG_SECTION:+config_cb}
 }
index fce5472cf2d9f7d547484bf5efcd7648866416df..6bf621437508fe77b02103fe944c455862269cf1 100644 (file)
@@ -1,6 +1,3 @@
 [ ifup = "$ACTION" ] && {
        uci set "/var/state/network.$INTERFACE.up=1"
-       [ -z "$DEVICE" ] || {
-               uci set "/var/state/network.$INTERFACE.ifname=$DEVICE"
-       }
 }
index 89e05a9839398163fed13e8c8caaec401f865436..e5645c8bbc9a3d420cb508c2957ac521d05377ed 100644 (file)
@@ -1,4 +1,4 @@
-src release http://downloads.openwrt.org/kamikaze/7.07/$S/packages
+src release http://downloads.openwrt.org/kamikaze/7.09/$S/packages
 src packages http://downloads.openwrt.org/kamikaze/packages/$A
 dest root /
 dest ram /tmp
index a5393883590661887c6fd382f18effb1ee239709..71f20488c9ad7c622038fdc43c552186ff353bd5 100644 (file)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
 uci_load() {
-       local PACKAGE="$1"
-       config_load "$PACKAGE"
-       local PACKAGE_BASE="$(basename "$PACKAGE")"
-       [ -f "/tmp/.uci/${PACKAGE_BASE}" ] && {
-               . "/tmp/.uci/${PACKAGE_BASE}" 2>/dev/null >/dev/null
-               config_cb
-       }
+       config_load "$1"
 }
 
 uci_apply_defaults() {(
index c384b3e142124238a5b60295c4418fb2aab396d2..3ff65ff8f564b559ae8159638bffced43abd65d4 100755 (executable)
@@ -137,6 +137,7 @@ setup_interface() {
        config_get mtu "$config" mtu
        config_get macaddr "$config" macaddr
        $DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up
+       uci set "/var/state/network.$config.ifname=$iface"
 
        pidfile="/var/run/$iface.pid"
        case "$proto" in
index 51e10af103639dc0ed29c95b9f89003ef84ef61c..8b65e4567d5b9b02c2d59bc650bf0551cd971fa8 100755 (executable)
@@ -38,11 +38,11 @@ bridge_interface() {(
 wifi_updown() {
        [ enable = "$1" ] && wifi_updown disable "$2"
        for device in ${2:-$DEVICES}; do (
-               config_get disabled "$device" disabled
-               [ 1 == "$disabled" ] && {
-                       echo "'$device' is disabled"
-                       set disable
-               }
+               config_get disabled "$device" disabled
+               [ 1 == "$disabled" ] && {
+                       echo "'$device' is disabled"
+                       set disable
+               }
                config_get iftype "$device" type
                if eval "type ${1}_$iftype" 2>/dev/null >/dev/null; then
                        eval "scan_$iftype '$device'"
index b21f33a63d87697ddb7828d31514eb6e9cd97c31..9e95fbece02fdc889e48d1598ed43c424180e159 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=broadcom-diag
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
 
index 6a70ed002c21f27a02c321dda73bb654fe4ec1bd..ef586baaedb86f9322d5d17ac514f4ff9eb18c4c 100644 (file)
@@ -113,6 +113,7 @@ enum {
        /* D-Link */
        DIR130,
        DIR330,
+       DWL3150,
 };
 
 static void __init bcm4780_init(void) {
@@ -491,7 +492,7 @@ static struct platform_t __initdata platforms[] = {
                .leds           = {
                        { .name = "power",      .gpio = 1 << 1, .polarity = NORMAL },
                        { .name = "wlan",       .gpio = 1 << 0, .polarity = REVERSE },
-                       { .name = "dmz",        .gpio = 1 << 6, .polarity = REVERSE },
+                       { .name = "wan",        .gpio = 1 << 6, .polarity = INPUT },
                        { .name = "diag",       .gpio = 1 << 7, .polarity = REVERSE },
                },
        },
@@ -579,6 +580,16 @@ static struct platform_t __initdata platforms[] = {
                        { .name = "blue",       .gpio = 1 << 6},
                },
        },
+       [DWL3150] = {
+               .name   = "D-Link DWL-3150",
+               .buttons        = {
+                       { .name = "reset",      .gpio = 1 << 7},
+               },
+               .leds     = {
+                       { .name = "diag",       .gpio = 1 << 2},
+                       { .name = "status",     .gpio = 1 << 1},
+               },
+       },
 };
 
 static struct platform_t __init *platform_detect(void)
@@ -715,6 +726,9 @@ static struct platform_t __init *platform_detect(void)
        if (!strncmp(boardnum, "04FN52", 6)) /* SimpleTech SimpleShare */
                return &platforms[STI_NAS];
 
+       if (!strcmp(getvar("boardnum"), "10") && !strcmp(getvar("boardrev"), "0x13")) /* D-Link DWL-3150 */
+               return &platforms[DWL3150];
+
        /* not found */
        return NULL;
 }
@@ -879,6 +893,7 @@ static void register_leds(struct led_t *l)
 {
        struct proc_dir_entry *p;
        u32 mask = 0;
+       u32 oe_mask = 0;
        u32 val = 0;
 
        leds = proc_mkdir("led", diag);
@@ -893,10 +908,13 @@ static void register_leds(struct led_t *l)
                        l->state = 0;
                        set_led_extif(l);
                } else {
+                       if (l->polarity != INPUT) oe_mask != l->gpio;
                        mask |= l->gpio;
                        val |= (l->polarity == NORMAL)?0:l->gpio;
                }
 
+               if (l->polarity == INPUT) continue;
+
                if ((p = create_proc_entry(l->name, S_IRUSR, leds))) {
                        l->proc.type = PROC_LED;
                        l->proc.ptr = l;
@@ -905,7 +923,7 @@ static void register_leds(struct led_t *l)
                }
        }
 
-       gpio_outen(mask, mask);
+       gpio_outen(mask, oe_mask);
        gpio_control(mask, 0);
        gpio_out(mask, val);
 }
index 93fdedb85cbd3b4a5ce5ae3ceca2b027ba755f1b..5f46d9dd8c9e6fb7d532c9e5edb425c0a26ccfe2 100644 (file)
@@ -30,6 +30,7 @@
 enum polarity_t {
        REVERSE = 0,
        NORMAL = 1,
+       INPUT = 2,
 };
 
 enum {
index 6b763741de0eeee247e0e01a74aa0c287eec36a5..46769bd622231d59727ebcf3dcfac4214a65f7cd 100644 (file)
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dnsmasq
-PKG_VERSION:=2.38
+PKG_VERSION:=2.39
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
-PKG_MD5SUM:=ab066a97c226066485ad20e5ad5ce424
+PKG_MD5SUM:=1ffccc1f0d9b8a08f2b99e03ba9cc08b
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -22,8 +22,6 @@ define Package/dnsmasq
   SECTION:=net
   CATEGORY:=Base system
   TITLE:=A lightweight DNS and DHCP server
-  DESCRIPTION:=\
-       It is intended to provide coupled DNS and DHCP service to a LAN.
   URL:=http://www.thekelleys.org.uk/dnsmasq/
 endef
 
@@ -31,6 +29,10 @@ define Package/dnsmasq/conffiles
 /etc/dnsmasq.conf
 endef
 
+define Package/dnsmasq/description
+ It is intended to provide coupled DNS and DHCP service to a LAN.
+endef
+
 define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) \
                $(TARGET_CONFIGURE_OPTS) \
index 14c77fb013217f541762c43b0fc602a7490da2c5..49f10220bc9b18485082ed42af277d9e1637c63c 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2007 OpenWrt.org
 
 START=60
 
@@ -16,55 +16,223 @@ dhcp_calc() {
        echo "$res"
 }
 
-dhcp_add() {
+append_bool() {
+       local section="$1"
+       local option="$2"
+       local value="$3"
+       local _tmp
+       config_get_bool _tmp "$section" "$option"
+       [ "$_tmp" -gt 0 ] && append args "$3"
+}
+
+dnsmasq() {
+       local cfg="$1"
+       append_bool "$cfg" authoritative "-K"
+       append_bool "$cfg" nodaemon "-d"
+       append_bool "$cfg" domainneeded "-D"
+       append_bool "$cfg" filterwin2k "-f"
+       append_bool "$cfg" nohosts "-h"
+       append_bool "$cfg" nonegcache "-N"
+       append_bool "$cfg" strictorder "-o"
+       append_bool "$cfg" logqueries "-q"
+       append_bool "$cfg" noresolv "-R"
+       append_bool "$cfg" localise_queries "-y"
+       append_bool "$cfg" readethers "-Z"
+       append_bool "$cfg" dbus "-l"
+       
+       config_get dnsforwardmax "$cfg" dnsforwardmax
+       dnsforwardmax="${dnsforwardmax:-150}"
+       append args "-0 $dnsforwardmax"
+       
+       config_get port "$cfg" port
+       port="${port:-53}"
+       append args "-p $port"
+       
+       config_get ednspacket_max "$cfg" ednspacket_max
+       ednspacket_max="${ednspacket_max:-1280}"
+       append args "-P $ednspacket_max"
+       
+       config_get dhcpleasemax "$cfg" dhcpleasemax
+       dhcpleasemax="${dhcpleasemax:-150}"
+       append args "-X $dhcpleasemax"
+       
+       config_get addnhosts "$cfg" addnhosts
+       config_get interface "$cfg" interface
+       config_get exceptinterface "$cfg" exceptinterface
+       config_get queryport "$cfg" queryport
+       config_get domain "$cfg" domain
+}
+
+dhcp_subscrid_add() {
+       local cfg="$1"
+       
+       config_get name "$cfg" name
+       [ -n "$name" ] || return 0
+       
+       config_get subscriberid "$cfg" subscriberid
+       [ -n "$subscriberid" ] || return 0
+       
+       append args "--dhcp-subscrid=$name,$subscriberid"
+       
+       dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_remoteid_add() {
+       local cfg="$1"
+
+       config_get name "$cfg" name
+       [ -n "$name" ] || return 0
+       
+       config_get remoteid "$cfg" remoteid
+       [ -n "$remoteid" ] || return 0
+       
+       append args "--dhcp-remoteid=$name,$remoteid"
+       
+       dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_circuitid_add() {
+       local cfg="$1"
+       
+       config_get name "$cfg" name
+       [ -n "$name" ] || return 0
+       
+       config_get circuitid "$cfg" circuitid
+       [ -n "$circuitid" ] || return 0
+       
+       append args "--dhcp-circuitid=$name,$circuitid"
+       
+       dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_userclass_add() {
+       local cfg="$1"
+       
+       config_get name "$cfg" name
+       [ -n "$name" ] || return 0
+       
+       config_get userclass "$cfg" userclass
+       [ -n "$userclass" ] || return 0
+       
+       append args "--dhcp-userclass=$name,$userclass"
+       
+       dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_vendorclass_add() {
+       local cfg="$1"
+       
+       config_get name "$cfg" name
+       [ -n "$name" ] || return 0
+       
+       config_get vendorclass "$cfg" vendorclass
+       [ -n "$vendorclass" ] || return 0
+       
+       append args "--dhcp-vendorclass=$name,$vendorclass"
+       
+       dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_host_add() {
+       local cfg="$1"
+       
+       config_get name "$cfg" name
+       [ -n "$name" ] || return 0
+       
+       config_get mac "$cfg" mac
+       [ -n "$mac" ] || return 0
+
+       
+       append args "--dhcp-host=$mac,$ip"
+       
+       dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_mac_add() {
        local cfg="$1"
+       
+       config_get name "$cfg" name
+       [ -n "$name" ] || return 0
+       
+       config_get mac "$cfg" mac
+       [ -n "$mac" ] || return 0
+       
+       append args "--dhcp-mac=$name,$mac"
+       
+       dhcp_option_add "$cfg" "$name"
+}
 
+dhcp_add() {
+       local cfg="$1"
        config_get net "$cfg" interface
        [ -n "$net" ] || return 0
-       
+
+       config_get name "$cfg" name
+       [ -n "$name" ] || name="$net"
+
        config_get ifname "$net" ifname
        [ -n "$ifname" ] || return 0
-       
-       config_get_bool ignore "$cfg" ignore
-       [ "$ignore" -gt 0 ] && {
-               append args "-I $ifname"
-               return 0
-       }
-       
+
+       append_bool "$cfg" ignore "-I $ifname"
+
        config_get proto "$net" proto
        [ static = "$proto" ] || return 0
-       
+
        config_get ipaddr "$net" ipaddr
        config_get netmask "$net" netmask
 
-       # check for an already active dhcp server on the interface, unless 'force' is set
+       #check for an already active dhcp server on the interface, unless 'force' is set
        config_get_bool force "$cfg" force 0
        [ "$force" -gt 0 ] || {
                udhcpc -n -q -R -s /bin/true -t 1 -i $ifname >&- && return 0
        }
        
        config_get start "$cfg" start
-       config_get end "$cfg" end
+       config_get limit "$cfg" limit
        config_get leasetime "$cfg" leasetime
        config_get options "$cfg" options
 
        leasetime="${leasetime:-12h}"
        start="$(dhcp_calc "${start:-100}")"
-       end="$((${end:-150} + 1))"
+       limit="$((${limit:-150} + 1))"
        eval "$(ipcalc.sh $ipaddr $netmask $start $end)"
-       append args "-F $START,$END,$NETMASK,$leasetime${options:+ $options}"
+       append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}"
+       
+       dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_option_add () {
+       local cfg="$1"
+       local name="$2"
+       
+       for count in $(seq 0 100); do
+               eval current_value=\$CONFIG_"$cfg"_dhcp"$count"
+               if [ -z "$current_value" ]; then
+                       let "count-=1"
+                       break
+               fi
+               append args "-O $name","$current_value"
+       done
+
 }
 
 start() {
        include /lib/network
        scan_interfaces
-       config_load /var/state/network
        config_load dhcp
 
        args=""
+       config_foreach dnsmasq dnsmasq
+       config_foreach dhcp_host_add host
+       config_foreach dhcp_mac_add mac
+       config_foreach dhcp_vendorclass_add vendorclass
+       config_foreach dhcp_userclass_add userclass
+       config_foreach dhcp_circuitid_add circuitid
+       config_foreach dhcp_remoteid_add remoteid
+       config_foreach dhcp_subscrid_add subscrid
        config_foreach dhcp_add dhcp
-       
-       dnsmasq $args && {
+
+       /usr/sbin/dnsmasq $args && {
                rm -f /tmp/resolv.conf
                cat > /tmp/resolv.conf <<EOF
 nameserver 127.0.0.1
index e107fe20f85b046f8491923f4fc38d83099c4b3d..047d7efee485cad5778ea30197813ababfb51d4d 100644 (file)
@@ -1,8 +1,8 @@
-Index: dnsmasq-2.38/src/config.h
+Index: dnsmasq-2.39/src/config.h
 ===================================================================
---- dnsmasq-2.38.orig/src/config.h     2007-06-04 13:22:23.553274640 +0200
-+++ dnsmasq-2.38/src/config.h  2007-06-04 13:22:23.626263544 +0200
-@@ -280,8 +280,9 @@
+--- dnsmasq-2.39.orig/src/config.h     2007-06-26 19:16:31.000000000 +0200
++++ dnsmasq-2.39/src/config.h  2007-06-26 19:16:31.000000000 +0200
+@@ -281,8 +281,9 @@
  /* We assume that systems which don't have IPv6
     headers don't have ntop and pton either */
  
index 3079c1eec3a17fc2f2252a50face126dd2cdce81..79f3b4456db51343cb473df36eead57340ec8542 100644 (file)
@@ -1,7 +1,7 @@
-Index: dnsmasq-2.38/src/netlink.c
+Index: dnsmasq-2.39/src/netlink.c
 ===================================================================
---- dnsmasq-2.38.orig/src/netlink.c    2007-06-04 13:22:23.531277984 +0200
-+++ dnsmasq-2.38/src/netlink.c 2007-06-04 13:22:23.814234968 +0200
+--- dnsmasq-2.39.orig/src/netlink.c    2007-06-26 19:16:31.000000000 +0200
++++ dnsmasq-2.39/src/netlink.c 2007-06-26 19:16:31.000000000 +0200
 @@ -17,6 +17,10 @@
  #include <linux/types.h>
  #include <linux/netlink.h>
diff --git a/package/dnsmasq/patches/103-hosts-fqdn.patch b/package/dnsmasq/patches/103-hosts-fqdn.patch
deleted file mode 100644 (file)
index 243e73b..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: dnsmasq-2.38/src/cache.c
-===================================================================
---- dnsmasq-2.38.orig/src/cache.c      2007-06-04 13:22:23.510281176 +0200
-+++ dnsmasq-2.38/src/cache.c   2007-06-04 13:22:24.014204568 +0200
-@@ -749,10 +749,11 @@
-      while ((token = strtok(NULL, " \t\n\r")) && (*token != '#'))
-        {
-        struct crec *cache;
-+       int fqdn = !!strchr(token, '.');
-        if (canonicalise(token))
-          {
-            /* If set, add a version of the name with a default domain appended */
--           if ((opts & OPT_EXPAND) && domain_suffix && !strchr(token, '.') && 
-+           if ((opts & OPT_EXPAND) && domain_suffix && !fqdn && 
-                (cache = malloc(sizeof(struct crec) + 
-                                strlen(token)+2+strlen(domain_suffix)-SMALLDNAME)))
-              {
index 60625947af3a9d5e0afe14c46a8059905191bf0c..7b38c1246025c1310e69ccc34d0ece3568269a38 100644 (file)
@@ -9,13 +9,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
-PKG_VERSION:=0.49
+PKG_VERSION:=0.50
 PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://matt.ucc.asn.au/dropbear/releases/ \
                                http://www.mirrors.wiretapped.net/security/cryptography/apps/ssh/dropbear/
-PKG_MD5SUM:=7b20c85f1ee34f018a1b948eae003df9
+PKG_MD5SUM:=5c0f7405b915799c3d952d3a93a5df69
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -28,8 +28,10 @@ define Package/dropbear
   SECTION:=net
   CATEGORY:=Base system
   TITLE:=Small SSH2 client/server
-  DESCRIPTION:=\
-       A small SSH2 server/client designed for small memory environments.
+endef
+
+define Package/dropbear/description
+ A small SSH2 server/client designed for small memory environments.
 endef
 
 define Package/dropbearconvert
@@ -75,8 +77,7 @@ endef
        
 define Package/dropbear/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti \
-               $(1)/usr/sbin/dropbear
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearmulti $(1)/usr/sbin/dropbear
        $(INSTALL_DIR) $(1)/usr/bin
        ln -sf ../sbin/dropbear $(1)/usr/bin/scp
        ln -sf ../sbin/dropbear $(1)/usr/bin/ssh
@@ -93,8 +94,7 @@ endef
 
 define Package/dropbearconvert/install
        $(INSTALL_DIR) $(1)/usr/bin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert \
-               $(1)/usr/bin/dropbearconvert
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/dropbearconvert $(1)/usr/bin/dropbearconvert
 endef
 
 $(eval $(call BuildPackage,dropbear))
index 3f76e3a743913e52a010a43c6da3ac1c6bcaf2f5..9c7fc19c4315dcca22876919323151c429e33490 100644 (file)
@@ -1,7 +1,7 @@
-Index: dropbear-0.49/svr-authpubkey.c
+Index: dropbear-0.50/svr-authpubkey.c
 ===================================================================
---- dropbear-0.49.orig/svr-authpubkey.c        2007-06-04 13:21:39.475975408 +0200
-+++ dropbear-0.49/svr-authpubkey.c     2007-06-04 13:21:39.542965224 +0200
+--- dropbear-0.50.orig/svr-authpubkey.c        2007-08-10 23:47:48.000000000 +0200
++++ dropbear-0.50/svr-authpubkey.c     2007-08-10 23:47:48.000000000 +0200
 @@ -176,6 +176,8 @@
                goto out;
        }
index 9a9a6afda14ad89c27f130c4385bce9d695c08e2..20bb41c2d2ae3fcc49d1f94dcda6811d11273a6d 100644 (file)
@@ -1,7 +1,7 @@
-Index: dropbear-0.49/svr-chansession.c
+Index: dropbear-0.50/svr-chansession.c
 ===================================================================
---- dropbear-0.49.orig/svr-chansession.c       2007-06-04 13:21:39.455978448 +0200
-+++ dropbear-0.49/svr-chansession.c    2007-06-04 13:21:39.751933456 +0200
+--- dropbear-0.50.orig/svr-chansession.c       2007-08-10 23:47:48.000000000 +0200
++++ dropbear-0.50/svr-chansession.c    2007-08-10 23:47:48.000000000 +0200
 @@ -908,12 +908,12 @@
        /* We can only change uid/gid as root ... */
        if (getuid() == 0) {
diff --git a/package/dropbear/patches/120-hostkey_prompt.patch b/package/dropbear/patches/120-hostkey_prompt.patch
deleted file mode 100644 (file)
index 3a34771..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: dropbear-0.49/cli-kex.c
-===================================================================
---- dropbear-0.49.orig/cli-kex.c       2007-06-04 13:21:39.435981488 +0200
-+++ dropbear-0.49/cli-kex.c    2007-06-04 13:21:39.937905184 +0200
-@@ -126,7 +126,7 @@
-               m_free(fp);
-               return;
-       }
--      fprintf(stderr, "\nHost '%s' is not in the trusted hosts file.\n(fingerprint %s)\nDo you want to continue connecting? (y/n)\n", 
-+      fprintf(stderr, "\nHost '%s' is not in the trusted hosts file.\n(fingerprint %s)\nDo you want to continue connecting? (y/n)", 
-                       cli_opts.remotehost, 
-                       fp);
-       m_free(fp);
index b8a7d44e81f4613e62e80d8189307cc7337f2f01..26b5b7f23767d3a3af87a291682068212a210052 100644 (file)
@@ -1,8 +1,8 @@
-Index: dropbear-0.49/cli-runopts.c
+Index: dropbear-0.50/cli-runopts.c
 ===================================================================
---- dropbear-0.49.orig/cli-runopts.c   2007-06-04 13:21:39.414984680 +0200
-+++ dropbear-0.49/cli-runopts.c        2007-06-04 13:21:40.122877064 +0200
-@@ -203,6 +203,10 @@
+--- dropbear-0.50.orig/cli-runopts.c   2007-08-10 23:47:47.000000000 +0200
++++ dropbear-0.50/cli-runopts.c        2007-08-10 23:47:49.000000000 +0200
+@@ -219,6 +219,10 @@
                                        debug_trace = 1;
                                        break;
  #endif
@@ -13,7 +13,7 @@ Index: dropbear-0.49/cli-runopts.c
                                case 'F':
                                case 'e':
                                case 'c':
-@@ -214,7 +218,6 @@
+@@ -230,7 +234,6 @@
  #ifndef ENABLE_CLI_LOCALTCPFWD
                                case 'L':
  #endif
diff --git a/package/dropbear/patches/140-use_dev_urandom.patch b/package/dropbear/patches/140-use_dev_urandom.patch
deleted file mode 100644 (file)
index 61deff8..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: dropbear-0.49/options.h
-===================================================================
---- dropbear-0.49.orig/options.h       2007-06-04 13:21:39.394987720 +0200
-+++ dropbear-0.49/options.h    2007-06-04 13:21:40.305849248 +0200
-@@ -159,7 +159,7 @@
-  * however significantly reduce the security of your ssh connections
-  * if the PRNG state becomes guessable - make sure you know what you are
-  * doing if you change this. */
--#define DROPBEAR_RANDOM_DEV "/dev/random"
-+#define DROPBEAR_RANDOM_DEV "/dev/urandom"
- /* prngd must be manually set up to produce output */
- /*#define DROPBEAR_PRNGD_SOCKET "/var/run/dropbear-rng"*/
index d8e283e4de85cb82e117b9021de53bf282dd3237..54d74d3ac541480f0e4cb12b99a5477c49bf14e2 100644 (file)
@@ -1,7 +1,7 @@
-Index: dropbear-0.49/options.h
+Index: dropbear-0.50/options.h
 ===================================================================
---- dropbear-0.49.orig/options.h       2007-06-04 13:21:40.305849248 +0200
-+++ dropbear-0.49/options.h    2007-06-04 13:21:40.493820672 +0200
+--- dropbear-0.50.orig/options.h       2007-08-10 23:47:47.000000000 +0200
++++ dropbear-0.50/options.h    2007-08-10 23:47:49.000000000 +0200
 @@ -5,6 +5,11 @@
  #ifndef _OPTIONS_H_
  #define _OPTIONS_H_
index 0fd9ef684d60bf5ba67f3096cf7189b150038e6d..8c06e0f912ced80494c92dae53e1888a3285e6cb 100644 (file)
@@ -1,8 +1,8 @@
-Index: dropbear-0.49/common-channel.c
+Index: dropbear-0.50/common-channel.c
 ===================================================================
---- dropbear-0.49.orig/common-channel.c        2007-06-04 13:21:39.354993800 +0200
-+++ dropbear-0.49/common-channel.c     2007-06-04 13:21:40.676792856 +0200
-@@ -310,10 +310,10 @@
+--- dropbear-0.50.orig/common-channel.c        2007-08-10 23:47:47.000000000 +0200
++++ dropbear-0.50/common-channel.c     2007-08-10 23:47:50.000000000 +0200
+@@ -311,10 +311,10 @@
                send_msg_channel_eof(channel);
        }
  
index 907c69313ee93f37edc86e0b57b1f598d468a537..9f61c8713e30f27f0d480961f9a4ca058332ffd6 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ebtables
 PKG_VERSION:=2.0.8-rc2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/ebtables
@@ -27,6 +27,9 @@ define Package/ebtables
   URL:=http://ebtables.sourceforge.net/
 endef
 
+MAKE_FLAGS += \
+       CFLAGS="$(TARGET_CFLAGS)"
+
 define Package/ebtables/install
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/ethertypes $(1)/etc/
index 559732bf4c83b05e3d2337babe5ed70889e02ac5..fe48314aac7660adb3171d0f4493c665864a42b0 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hotplug2
 PKG_VERSION:=0.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://isteve.bofh.cz/~isteve/hotplug2
index 4eb762fb011aadaf681a9e75e8450b288ac23aaf..8429857824e145869b690ed043c4dec4263caa1a 100644 (file)
@@ -3,3 +3,8 @@ $include /etc/hotplug2-init.rules
 SUBSYSTEM ~~ (net|button|usb) {
        exec /sbin/hotplug-call %SUBSYSTEM%;
 }
+
+DEVICENAME ~~ (watchdog) {
+       exec /sbin/watchdog -t 5 /dev/watchdog;
+       next
+}
index 8bec6e7725f11aee2d9dd187d1d303d77008450f..9fe38678dd52828e7002a930aa118e787b849187 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=keynote
 PKG_VERSION:=2.3
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://downloads.openwrt.org/sources/
@@ -23,18 +23,23 @@ define Package/keynote
   CATEGORY:=Network
   DEPENDS:=@LINUX_2_6 +libopenssl
   TITLE:=Simple and flexible trust-management system
-  DESCRIPTION:=\
-       KeyNote is a simple and flexible trust-management system designed to work \\\
-       well for a variety of large- and small- scale Internet-based applications.\\\
-       It provides a single, unified language for both local policies and \\\
-       credentials. 
   URL:=http://www1.cs.columbia.edu/~angelos/keynote.html
 endef
 
+define Package/keynote/description
+ KeyNote is a simple and flexible trust-management system designed to work 
+ well for a variety of large- and small- scale Internet-based applications.
+ It provides a single, unified language for both local policies and 
+ credentials.
+endef
+
 CONFIGURE_ARGS += \
        --enable-static \
        --enable-shared
 
+MAKE_FLAGS += \
+       CFLAGS="$(TARGET_CFLAGS)"
+
 define Build/InstallDev
        mkdir -p $(STAGING_DIR)/usr/include/keynote
        $(CP) $(PKG_BUILD_DIR)/{assertion,header,keynote,signature}.h $(STAGING_DIR)/usr/include/keynote/
index 907f19117992a7eff1dedd40f7f279135d28b46f..5fad7aab36d4a40c0b80fbdecf48635fd23b8360 100644 (file)
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=madwifi
 PKG_VERSION:=r2568-20070710
 PKG_BRANCH:=madwifi-ng
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_BRANCH)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://snapshots.madwifi.org/$(PKG_BRANCH)
@@ -47,9 +47,6 @@ ifneq ($(CONFIG_LINUX_2_6_ATHEROS),)
   BUS:=AHB
   HAL_TARGET:=ap51
 endif
-ifneq ($(CONFIG_LINUX_2_6_ARUBA),)
-  BUS:=PCI AHB # no suitable HAL for AHB yet.
-endif
 
 BUS_MODULES:=
 ifeq ($(findstring AHB,$(BUS)),AHB)
@@ -82,8 +79,6 @@ define KernelPackage/madwifi
   SUBMENU:=Wireless Drivers
   TITLE:=Driver for Atheros wireless chipsets
   DEPENDS:=+wireless-tools @!LINUX_2_6_AVR32
-  DESCRIPTION:=\
-       This package contains a driver for Atheros 802.11a/b/g chipsets.
   URL:=http://madwifi.org/
   VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
   FILES:= \
@@ -94,6 +89,10 @@ define KernelPackage/madwifi
   AUTOLOAD:=$(call AutoLoad,50,$(MADWIFI_AUTOLOAD))
 endef
 
+define KernelPackage/madwifi/description
+ This package contains a driver for Atheros 802.11a/b/g chipsets.
+endef
+
 MADWIFI_MAKEOPTS= -C $(PKG_BUILD_DIR) \
                PATH="$(TARGET_PATH)" \
                ARCH="$(LINUX_KARCH)" \
index 07a6cd78bf74b1285d527dd8bb4b90c237fd5559..854af03ebdd4683fe726bd142aac4a98fbc46a61 100755 (executable)
@@ -102,7 +102,7 @@ enable_atheros() {
                                *a) agmode=11a;;
                                *) agmode=auto;;
                        esac
-                       iwconfig "$ifname" channel 0 >/dev/null 2>/dev/null 
+                       iwconfig "$ifname" channel "$channel" >/dev/null 2>/dev/null 
                        ifconfig "$ifname" up
                        sleep 1
                        iwpriv "$ifname" mode "$agmode"
diff --git a/package/madwifi/patches/131-minstrel_rateidx.patch b/package/madwifi/patches/131-minstrel_rateidx.patch
new file mode 100644 (file)
index 0000000..2cec5a7
--- /dev/null
@@ -0,0 +1,17 @@
+Index: madwifi-ng-r2568-20070710/ath_rate/minstrel/minstrel.c
+===================================================================
+--- madwifi-ng-r2568-20070710.orig/ath_rate/minstrel/minstrel.c        2007-08-11 02:08:15.931956005 +0200
++++ madwifi-ng-r2568-20070710/ath_rate/minstrel/minstrel.c     2007-08-11 02:09:37.572608440 +0200
+@@ -675,6 +675,12 @@
+               }
+               for (x = 0; x < ni->ni_rates.rs_nrates; x++) {
++                      if (sn->rates[x].rix == 0xff) {
++                              DPRINTF(sc, "%s: %s ignore bogus rix at %d\n",
++                                      dev_info, __func__, x);
++                              continue;
++                      }
++
+                       sn->rs_rateattempts     [x] = 0;
+                       sn->rs_thisprob         [x] = 0;
+                       sn->rs_ratesuccess      [x] = 0;
diff --git a/package/madwifi/patches/306-bstuck_calibrate.patch b/package/madwifi/patches/306-bstuck_calibrate.patch
deleted file mode 100644 (file)
index 1729132..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-Index: madwifi-ng-r2568-20070710/ath/if_ath.c
-===================================================================
---- madwifi-ng-r2568-20070710.orig/ath/if_ath.c        2007-07-23 01:48:45.690583928 +0200
-+++ madwifi-ng-r2568-20070710/ath/if_ath.c     2007-07-23 01:48:46.026603077 +0200
-@@ -153,6 +153,7 @@
- static void ath_turbo_switch_mode(unsigned long);
- static int ath_check_beacon_done(struct ath_softc *);
- #endif
-+static void ath_do_calibrate(struct net_device *);
- static void ath_beacon_send(struct ath_softc *, int *);
- static void ath_beacon_start_adhoc(struct ath_softc *, struct ieee80211vap *);
- static void ath_beacon_return(struct ath_softc *, struct ath_buf *);
-@@ -4175,7 +4176,7 @@
-               DPRINTF(sc, ATH_DEBUG_BEACON_PROC,
-                       "%s: missed %u consecutive beacons\n",
-                       __func__, sc->sc_bmisscount);
--              if (sc->sc_bmisscount > BSTUCK_THRESH)
-+              if (sc->sc_bmisscount > BSTUCK_CALIBR_THR)
-                       ATH_SCHEDULE_TQUEUE(&sc->sc_bstucktq, needmark);
-               return;
-       }
-@@ -4314,8 +4315,17 @@
-        *     check will be true, in which case return 
-        *     without resetting the driver.
-        */
--      if (sc->sc_bmisscount <= BSTUCK_THRESH)
-+      if (sc->sc_bmisscount <= BSTUCK_CALIBR_THR)
-               return;
-+
-+      if (sc->sc_bmisscount <= BSTUCK_RESET_THR) {
-+              ATH_LOCK(sc);
-+              ath_do_calibrate(dev);
-+              mod_timer(&sc->sc_cal_ch, jiffies + (ath_calinterval * HZ));
-+              ATH_UNLOCK(sc);
-+              return;
-+      }
-+
-       printk("%s: stuck beacon; resetting (bmiss count %u)\n",
-               DEV_NAME(dev), sc->sc_bmisscount);
-       ath_reset(dev);
-@@ -8029,17 +8039,13 @@
-  * Periodically recalibrate the PHY to account
-  * for temperature/environment changes.
-  */
--static void
--ath_calibrate(unsigned long arg)
-+static void ath_do_calibrate(struct net_device *dev)
- {
--      struct net_device *dev = (struct net_device *) arg;
-       struct ath_softc *sc = dev->priv;
-       struct ath_hal *ah = sc->sc_ah;
--      /* u_int32_t nchans; */
-       HAL_BOOL isIQdone = AH_FALSE;
-       sc->sc_stats.ast_per_cal++;
--
-       DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: channel %u/%x\n",
-               __func__, sc->sc_curchan.channel, sc->sc_curchan.channelFlags);
-@@ -8057,15 +8063,26 @@
-                       __func__, sc->sc_curchan.channel);
-               sc->sc_stats.ast_per_calfail++;
-       }
--
--      ath_hal_process_noisefloor(ah);
-       if (isIQdone == AH_TRUE)
-               ath_calinterval = ATH_LONG_CALINTERVAL;
-       else
-               ath_calinterval = ATH_SHORT_CALINTERVAL;
-+}
-+
-+static void
-+ath_calibrate(unsigned long arg)
-+{
-+      struct net_device *dev = (struct net_device *) arg;
-+      struct ath_softc *sc = dev->priv;
-+      struct ath_hal *ah = sc->sc_ah;
-+
-+      ATH_LOCK(sc);
-+      ath_do_calibrate(dev);
-+      ath_hal_process_noisefloor(ah);
-       sc->sc_cal_ch.expires = jiffies + (ath_calinterval * HZ);
-       add_timer(&sc->sc_cal_ch);
-+      ATH_UNLOCK(sc);
- }
- static void
-Index: madwifi-ng-r2568-20070710/ath/if_athvar.h
-===================================================================
---- madwifi-ng-r2568-20070710.orig/ath/if_athvar.h     2007-07-23 01:48:45.406567742 +0200
-+++ madwifi-ng-r2568-20070710/ath/if_athvar.h  2007-07-23 01:48:46.026603077 +0200
-@@ -538,7 +538,8 @@
-  */
- #define ATH_TXQ_MOVE_Q(_tqs,_tqd)  ATH_TXQ_MOVE_MCASTQ(_tqs,_tqd)
--#define       BSTUCK_THRESH   10      /* # of stuck beacons before resetting NB: this is a guess*/
-+#define       BSTUCK_CALIBR_THR       3       /* # of stuck beacons before restarting calibration */
-+#define       BSTUCK_RESET_THR        10      /* # of stuck beacons before resetting NB: this is a guess*/
- struct ath_softc {
-       struct ieee80211com sc_ic;              /* NB: must be first */
diff --git a/package/madwifi/patches/306-mib_intr_workaround.patch b/package/madwifi/patches/306-mib_intr_workaround.patch
new file mode 100644 (file)
index 0000000..c00c73a
--- /dev/null
@@ -0,0 +1,83 @@
+Index: madwifi-ng-r2568-20070710/ath/if_ath.c
+===================================================================
+--- madwifi-ng-r2568-20070710.orig/ath/if_ath.c        2007-08-01 11:07:47.882943145 +0200
++++ madwifi-ng-r2568-20070710/ath/if_ath.c     2007-08-01 11:41:11.781138794 +0200
+@@ -203,6 +203,7 @@
+ static void ath_flushrecv(struct ath_softc *);
+ static void ath_chan_change(struct ath_softc *, struct ieee80211_channel *);
+ static void ath_calibrate(unsigned long);
++static void ath_mib_enable(unsigned long);
+ static int ath_newstate(struct ieee80211vap *, enum ieee80211_state, int);
+ static void ath_scan_start(struct ieee80211com *);
+@@ -660,6 +661,10 @@
+       sc->sc_cal_ch.function = ath_calibrate;
+       sc->sc_cal_ch.data = (unsigned long) dev;
++      init_timer(&sc->sc_mib_enable);
++      sc->sc_mib_enable.function = ath_mib_enable;
++      sc->sc_mib_enable.data = (unsigned long) sc;
++
+ #ifdef ATH_SUPERG_DYNTURBO
+       init_timer(&sc->sc_dturbo_switch_mode);
+       sc->sc_dturbo_switch_mode.function = ath_turbo_switch_mode;
+@@ -1751,16 +1756,19 @@
+               if (status & HAL_INT_MIB) {
+                       sc->sc_stats.ast_mib++;
+                       /*
+-                       * Disable interrupts until we service the MIB
+-                       * interrupt; otherwise it will continue to fire.
+-                       */
+-                      ath_hal_intrset(ah, 0);
+-                      /*
+-                       * Let the HAL handle the event.  We assume it will
+-                       * clear whatever condition caused the interrupt.
++                       * When the card receives lots of PHY errors, the MIB
++                       * interrupt will fire at a very rapid rate. We will use
++                       * a timer to enforce at least 1 jiffy delay between
++                       * MIB interrupts. This should be unproblematic, since
++                       * the hardware will continue to update the counters in the
++                       * mean time.
+                        */
+-                      ath_hal_mibevent(ah, &sc->sc_halstats);
++                      sc->sc_imask &= ~HAL_INT_MIB;
+                       ath_hal_intrset(ah, sc->sc_imask);
++                      mod_timer(&sc->sc_mib_enable, jiffies + 1);
++
++                      /* Let the HAL handle the event. */
++                      ath_hal_mibevent(ah, &sc->sc_halstats);
+               }
+       }
+       if (needmark)
+@@ -8029,6 +8037,19 @@
+ }
+ /*
++ * Enable MIB interrupts again, after the ISR disabled them
++ * to slow down the rate of PHY error reporting.
++ */
++static void
++ath_mib_enable(unsigned long arg)
++{
++      struct ath_softc *sc = (struct ath_softc *) arg;
++
++      sc->sc_imask |= HAL_INT_MIB;
++      ath_hal_intrset(sc->sc_ah, sc->sc_imask);
++}
++
++/*
+  * Periodically recalibrate the PHY to account
+  * for temperature/environment changes.
+  */
+Index: madwifi-ng-r2568-20070710/ath/if_athvar.h
+===================================================================
+--- madwifi-ng-r2568-20070710.orig/ath/if_athvar.h     2007-08-01 11:33:50.800008711 +0200
++++ madwifi-ng-r2568-20070710/ath/if_athvar.h  2007-08-01 11:34:33.202425088 +0200
+@@ -687,6 +687,7 @@
+       struct ctl_table *sc_sysctls;
+       u_int16_t sc_reapcount;                 /* # of tx buffers reaped after net dev stopped */
++      struct timer_list sc_mib_enable;
+ #ifdef ATH_REVERSE_ENGINEERING
+       u_int8_t register_snapshot[MAX_REGISTER_ADDRESS];
index 20945852ceda079c9388c9145218a94ac6bf6f47..c37eb3cde6da69e42780e22ac693bc90813896da 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ppp
 PKG_VERSION:=2.4.3
-PKG_RELEASE:=7
+PKG_RELEASE:=8
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
index 0d0941fda533dd7b3839d3a37968a6059a3442fd..5ca1cf9c7d3ecf56eae4c6613ddeeb038791ceb8 100644 (file)
@@ -1,8 +1,12 @@
 scan_ppp() {
        config_get ifname "$1" ifname
        pppdev="${pppdev:-0}"
-       config_set "$1" ifname "ppp$pppdev"
-       config_set "$1" unit "$pppdev"
+       config_get unit "$1" unit
+       [ -z "$unit" ] && {
+               config_set "$1" ifname "ppp$pppdev"
+               config_set "$1" unit "$pppdev"
+               pppdev="$(($pppdev + 1))"
+       }
 }
 
 start_pppd() {
@@ -24,6 +28,9 @@ start_pppd() {
 
        config_get connect "$cfg" connect
        config_get disconnect "$cfg" disconnect
+       config_get pppd_options "$cfg" pppd_options
+       config_get_bool defaultroute "$cfg" defaultroute 1
+       [ "$defaultroute" -eq 1 ] && defaultroute="defaultroute replacedefaultroute" || defaultroute=""
 
        interval="${keepalive##*[, ]}"
        [ "$interval" != "$keepalive" ] || interval=5
@@ -34,13 +41,14 @@ start_pppd() {
                ${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
                ${demand:+precompiled-active-filter /etc/ppp/filter demand idle }${demand:-persist} \
                usepeerdns \
-               defaultroute \
-               replacedefaultroute \
+               $defaultroute \
                ${username:+user "$username" password "$password"} \
+               unit "$unit" \
                linkname "$cfg" \
                ipparam "$cfg" \
                ${connect:+connect "$connect"} \
-               ${disconnect:+disconnect "$disconnect"}
+               ${disconnect:+disconnect "$disconnect"} \
+               ${pppd_options}
 
        lock -u "/var/lock/ppp-${cfg}"
 }
index 86bddddf59d33bfa119a842c0c349ec6b345c3cc..ba6a8768daec33884591fe964c41c216ea9460c5 100644 (file)
@@ -12,6 +12,11 @@ setup_interface_pppoe() {
                /sbin/insmod $module 2>&- >&-
        done
 
+       # make sure the network state references the correct ifname
+       scan_ppp "$config"
+       config_get ifname "$config" ifname
+       uci set "/var/state/network.$config.ifname=$ifname"
+
        config_get mtu "$cfg" mtu
        mtu=${mtu:-1492}
        start_pppd "$config" \
index eb6652f008ce0b91b694fecc379e91a1e5d7af77..6009310f74f0ab91a0f92b1bcb523a39de003814 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pptp
 PKG_VERSION:=1.6.0
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/pptpclient
index c61bdc02062ace29113186f1ce1979c7bcaf3004..f1c46c9a39cf9c2f06ff2693e920acef7b9ac936 100644 (file)
@@ -3,15 +3,27 @@ scan_pptp() {
 }
 
 setup_interface_pptp() {
-       local iface="$1"
        local config="$2"
+       local ifname
        
        config_get device "$config" device
+       config_get ipproto "$config" ipproto
 
        for module in slhc ppp_generic ppp_async ip_gre; do
                /sbin/insmod $module 2>&- >&-
        done
-       setup_interface "$iface" "$config" "dhcp"
+       sleep 1
+
+       setup_interface "$device" "$config" "${ipproto:-dhcp}"
+
+       # fix up the netmask
+       config_get netmask "$config" netmask
+       [ -z "$netmask" -o -z "$device" ] || ifconfig $device netmask $netmask
+
+       # make sure the network state references the correct ifname
+       scan_ppp "$config"
+       config_get ifname "$config" ifname
+       uci set "/var/state/network.$config.ifname=$ifname"
 
        config_get mtu "$cfg" mtu
        config_get server "$cfg" server
index bc7a6598c45fa0da2d3ea0cc388b8f50b61f6bed..c8d141cceb6d279ab947a99985093523c83cdad7 100644 (file)
@@ -9,7 +9,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qos-scripts
-PKG_VERSION:=1.2.0
+PKG_VERSION:=1.2.1
 PKG_RELEASE:=1
 
 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
index a2f7d719c71f89d44defd08c5b0ec705ca30257b..04c833b5c5137c9b294614a9b0053459e338895e 100755 (executable)
@@ -116,6 +116,22 @@ parse_matching_rule() {
                                add_insmod ipt_connbytes
                                append "$var" "-m connbytes --connbytes $value --connbytes-dir both --connbytes-mode bytes"
                        ;;
+                       *:tos)
+                                add_insmod ipt_tos
+                                case "$value" in
+                                        !*) append "$var" "-m tos ! --tos $value";;
+                                        *) append "$var" "-m tos --tos $value"
+                                esac
+                        ;;
+                       *:dscp)
+                                add_insmod ipt_dscp
+                               dscp_option="--dscp"
+                                [ -z "${value%%[EBCA]*}" ] && dscp_option="--dscp-class"
+                               case "$value" in
+                                               !*) append "$var" "-m dscp ! $dscp_option $value";;
+                                               *) append "$var" "-m dscp $dscp_option $value"
+                                esac
+                        ;;
                        *:direction)
                                value="$(echo "$value" | sed -e 's,-,:,g')"
                                if [ "$value" = "out" ]; then
@@ -146,6 +162,19 @@ parse_matching_rule() {
                                        !*) append "$var" "-m mark ! --mark $class";;
                                        *) append "$var" "-m mark --mark $class";;
                                esac
+                       ;;
+                       1:TOS)
+                               add_insmod ipt_TOS
+                               config_get TOS "$rule" 'TOS'
+                               suffix="-j TOS --set-tos "${TOS:-"Normal-Service"}
+                       ;;
+                       1:DSCP)
+                               add_insmod ipt_DSCP
+                               config_get DSCP "$rule" 'DSCP'
+                               [ -z "${DSCP%%[EBCA]*}" ] && set_value="--set-dscp-class $DSCP" \
+                               || set_value="--set-dscp $DSCP"
+                               suffix="-j DSCP $set_value"
+                       ;;
                esac
        done
        append "$var" "$suffix"
@@ -247,7 +276,6 @@ start_interface() {
        config_get device "$iface" device
        config_get_bool enabled "$iface" enabled 1
        [ -z "$device" -o 1 -ne "$enabled" ] && {
-               echo "Interface '$iface' not found or disabled." >&2
                return 1 
        }
        config_get upload "$iface" upload
@@ -328,6 +356,16 @@ add_rules() {
                config_get target "$rule" target
                config_get target "$target" classnr
                config_get options "$rule" options
+
+               ## If we want to override the TOS field, let's clear the DSCP field first.
+               [ ! -z "$(echo $options | grep 'TOS')" ] && {
+                       s_options=${options%%TOS}
+                       add_insmod ipt_DSCP
+                       parse_matching_rule iptrule "$rule" "$s_options" "$prefix" "-j DSCP --set-dscp 0"
+                       append "$var" "$iptrule" "$N"
+                       unset iptrule
+               }
+
                parse_matching_rule iptrule "$rule" "$options" "$prefix" "-j MARK --set-mark $target"
                append "$var" "$iptrule" "$N"
        done
index b40d496c885e378eb82f5abbaecd2fb4ae65857c..f053f8389e9f5164ec428e17ad04f5786fbf035a 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=rt61
 PKG_VERSION:=cvs-2007060307
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@openwrt/
@@ -22,16 +22,20 @@ include $(INCLUDE_DIR)/package.mk
 define KernelPackage/rt61
   SUBMENU:=Wireless Drivers
   TITLE:=Driver for ralink MiMo pci chipsets 
-  DEPENDS:=@LINUX_2_6_RDC +wireless-tools
+  DEPENDS:=@LINUX_2_6 @PCI_SUPPORT +wireless-tools
   DESCRIPTION:=\
-        This package contains a driver for ralink rt61xx pci chipsets.
+        This package contains a driver for ralink rt2x61 pci chipsets.
   URL:=http://rt2x00.serialmonkey.com/
-  VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
   FILES:= \
                 $(PKG_BUILD_DIR)/Module/rt61.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,50,rt61)
 endef
 
+define KernelPackage/rt61/install
+       mkdir -p $(1)/lib/firmware
+       $(CP) -L $(PKG_BUILD_DIR)/Module/rt2?61*.bin $(1)/lib/firmware
+endef
+
 LINUX_PATCHLEVEL:=$(shell echo "$(LINUX_VERSION)" | cut -d. -f2)
 
 define Build/Compile
diff --git a/package/rt61/patches/002-big_endian_fixes.patch b/package/rt61/patches/002-big_endian_fixes.patch
new file mode 100644 (file)
index 0000000..e5cbe7e
--- /dev/null
@@ -0,0 +1,61 @@
+diff -ruN rt61-cvs-2007060307-old/Module/rt_config.h rt61-cvs-2007060307-new/Module/rt_config.h
+--- rt61-cvs-2007060307-old/Module/rt_config.h 2007-06-03 14:35:29.000000000 +0200
++++ rt61-cvs-2007060307-new/Module/rt_config.h 2007-08-25 20:45:36.000000000 +0200
+@@ -162,7 +162,6 @@
+ #endif
+ #ifdef __BIG_ENDIAN
+-#warning Compiling for big endian machine.
+ #define BIG_ENDIAN TRUE
+ #endif                                /* __BIG_ENDIAN */
+diff -ruN rt61-cvs-2007060307-old/Module/rtmp.h rt61-cvs-2007060307-new/Module/rtmp.h
+--- rt61-cvs-2007060307-old/Module/rtmp.h      2007-05-19 19:19:17.000000000 +0200
++++ rt61-cvs-2007060307-new/Module/rtmp.h      2007-08-25 20:44:27.000000000 +0200
+@@ -1617,14 +1617,8 @@
+ VOID RTMPFreeDMAMemory(IN PRTMP_ADAPTER pAdapter);
+ // Enable & Disable NIC interrupt via writing interrupt mask register
+ // Since it use ADAPTER structure, it have to be put after structure definition.
+-#ifdef BIG_ENDIAN
+-inline
+-#endif
+- VOID NICDisableInterrupt(IN PRTMP_ADAPTER pAdapter);
+-#ifdef BIG_ENDIAN
+-inline
+-#endif
+- VOID NICEnableInterrupt(IN PRTMP_ADAPTER pAdapter);
++VOID NICDisableInterrupt(IN PRTMP_ADAPTER pAdapter);
++VOID NICEnableInterrupt(IN PRTMP_ADAPTER pAdapter);
+ VOID NICInitTxRxRingAndBacklogQueue(IN PRTMP_ADAPTER pAdapter);
+ VOID NICReadEEPROMParameters(IN PRTMP_ADAPTER pAd);
+ VOID NICInitAsicFromEEPROM(IN PRTMP_ADAPTER pAd);
+diff -ruN rt61-cvs-2007060307-old/Module/rtmp_init.c rt61-cvs-2007060307-new/Module/rtmp_init.c
+--- rt61-cvs-2007060307-old/Module/rtmp_init.c 2007-05-23 14:14:23.000000000 +0200
++++ rt61-cvs-2007060307-new/Module/rtmp_init.c 2007-08-25 20:43:51.000000000 +0200
+@@ -549,24 +549,14 @@
+ // By removing 'inline' directive from the function definitions.
+ // Then Driverloader is compiled and runs smooth after kernel 2.6.9
+-#ifdef BIG_ENDIAN
+-inline VOID
+-#else
+-VOID
+-#endif
+-NICDisableInterrupt(IN PRTMP_ADAPTER pAdapter)
++VOID NICDisableInterrupt(IN PRTMP_ADAPTER pAdapter)
+ {
+       RTMP_IO_WRITE32(pAdapter, INT_MASK_CSR, 0xffffff7f);    // 0xffffff7f
+       RTMP_IO_WRITE32(pAdapter, MCU_INT_MASK_CSR, 0xffffffff);
+       RTMP_CLEAR_FLAG(pAdapter, fRTMP_ADAPTER_INTERRUPT_ACTIVE);
+ }
+-#ifdef BIG_ENDIAN
+-inline VOID
+-#else
+-VOID
+-#endif
+-NICEnableInterrupt(IN PRTMP_ADAPTER pAdapter)
++VOID NICEnableInterrupt(IN PRTMP_ADAPTER pAdapter)
+ {
+       //
+       // Flag "fOP_STATUS_DOZE" On, means ASIC put to sleep, else means ASIC WakeUp
index 9993b3b034b61ef3e768852b5f2003e041c4f890..65a77bef5d4ce598f28d2fe9f65c4f31af767f1b 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=strongswan
 PKG_VERSION:=2.8.2
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://download.strongswan.org/
@@ -22,36 +22,40 @@ include $(INCLUDE_DIR)/package.mk
 define Package/strongswan/Default
   TITLE:=strongSwan
   DEPENDS:=@LINUX_2_4
-  DESCRIPTION:=\
-       strongSwan is an IPsec implementation for Linux.
   URL:=http://www.strongswan.org/
 endef
 
+define Package/strongswan/Default/description
+ strongSwan is an IPsec implementation for Linux.
+endef
+
 define Package/strongswan
-  $(call Package/strongswan/Default)
+$(call Package/strongswan/Default)
   SECTION:=net
   CATEGORY:=Network
   DEPENDS:=+kmod-strongswan +libgmp @LINUX_2_4
   TITLE+= (daemon)
-  DESCRIPTION+=\\\
-       \\\
-       This package contains the strongSwan user-land daemon.
-  URL:=http://www.strongswan.org/
+endef
+
+define Package/strongswan/description
+$(call Package/strongswan/Default/description)
+ This package contains the strongSwan user-land daemon.
 endef
 
 define KernelPackage/strongswan
+$(call Package/strongswan/Default)
   SUBMENU:=Network Support
-  $(call Package/strongswan/Default)
   TITLE+= (kernel module)
   DEPENDS:=@LINUX_2_4
-  DESCRIPTION+=\\\
-       \\\
-       This package contains the strongSwan kernel module.
-  VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
   FILES:=$(PKG_BUILD_DIR)/linux/net/ipsec/ipsec.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,50,ipsec)
 endef
 
+define KernelPackage/strongswan/description
+$(call Package/strongswan/Default/description)
+ This package contains the strongSwan kernel module.
+endef
+
 PKG_MAKE_OPTS:= \
                LINUX_RELEASE="$(LINUX_RELEASE)" \
                KERNELSRC="$(LINUX_DIR)" \
index 95e0958b84f49c81d4c1fff42b5557b70e8e5498..0716bf79bc54685b04e1a22102f2a1e0ea91660e 100644 (file)
@@ -5,4 +5,4 @@ CTLFILE="/var/run/pluto.ctl"
 
 [ -e "$CTLFILE" ] || exit
 
-/etc/init.d/ipsec restart
+/etc/init.d/ipsec update
index 1870c99d0f89776f87101a799a7820f56d51ce04..78f301a38270dd666b3f7d91d42ea6bbbbc17291 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=kmod-wlcompat
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
 
index d849be855f8818a15700f9ab065c4c886a01e376..3e869ea7958f8ca957d7c90b4f79e82096e5d35f 100644 (file)
@@ -482,7 +482,7 @@ static int wlcompat_get_scan(struct net_device *dev,
                /* send frequency/channel info */
                iwe.cmd = SIOCGIWFREQ;
                iwe.u.freq.e = 0;
-               iwe.u.freq.m = bss_info->chanspec;
+               iwe.u.freq.m = bss_info->chanspec & WL_CHANSPEC_CHAN_MASK;
                current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
 
                /* add quality statistics */
index 066a3997890a969acb4df38381560b01fd315c0a..15407d5a3f8227d914f00b85aad061485862473f 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zlib
 PKG_VERSION:=1.2.3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=http://www.zlib.net @SF/zlib
@@ -62,8 +62,10 @@ define Build/UninstallDev
                $(STAGING_DIR)/usr/lib/libz.{a,so*}
 endef
 
+# libz.so is needed for openssl (zlib-dynamic)
 define Package/zlib/install
        $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so $(1)/usr/lib/
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libz.so.* $(1)/usr/lib/
 endef
 
index 2f4a968ea73a9a80c83bbc22185b8b10e67a595d..53b8f11025f75d2ef2850e7a986db13dcd48cb6c 100755 (executable)
@@ -49,15 +49,17 @@ sub config_and($$) {
 }
 
 
-sub config_add($$) {
+sub config_add($$$) {
        my $cfg1 = shift;
        my $cfg2 = shift;
+       my $mod_plus = shift;
        my %config;
        
        for ($cfg1, $cfg2) {
                my %cfg = %$_;
                
                foreach my $config (keys %cfg) {
+                       next if $mod_plus and $config{$config} and $config{$config} eq "y";
                        $config{$config} = $cfg{$config};
                }
        }
@@ -123,7 +125,11 @@ sub parse_expr($) {
        } elsif ($arg =~ /^\+/) {
                my $arg1 = parse_expr($pos);
                my $arg2 = parse_expr($pos);
-               return config_add($arg1, $arg2);
+               return config_add($arg1, $arg2, 0);
+       } elsif ($arg =~ /^m\+/) {
+               my $arg1 = parse_expr($pos);
+               my $arg2 = parse_expr($pos);
+               return config_add($arg1, $arg2, 1);
        } elsif ($arg eq '>') {
                my $arg1 = parse_expr($pos);
                my $arg2 = parse_expr($pos);
index 543dcc1879e5288e838b811a007044a4baae12c8..66eaca8b36497062aedf496ba6bb9802350d99df 100755 (executable)
@@ -112,15 +112,23 @@ foreach my $mirror (@ARGV) {
                        push @mirrors, "http://downloads.sourceforge.net/$1";
                }
        } elsif ($mirror =~ /^\@GNU\/(.+)$/) {
-               my $gnupath = $1;
-               push @mirrors, "ftp://ftp.gnu.org/gnu/$gnupath";
-               push @mirrors, "ftp://ftp.belnet.be/mirror/ftp.gnu.org/gnu/$gnupath";
-               push @mirrors, "ftp://ftp.mirror.nl/pub/mirror/gnu/$gnupath";
-               push @mirrors, "http://mirror.switch.ch/ftp/mirror/gnu/$gnupath";
-               push @mirrors, "ftp://ftp.uu.net/archive/systems/gnu/$gnupath";
-               push @mirrors, "ftp://ftp.eu.uu.net/pub/gnu/$gnupath";
-               push @mirrors, "ftp://ftp.leo.org/pub/comp/os/unix/gnu/$gnupath";
-               push @mirrors, "ftp://ftp.digex.net/pub/gnu/$gnupath";
+               push @mirrors, "ftp://ftp.gnu.org/gnu/$1";
+               push @mirrors, "ftp://ftp.belnet.be/mirror/ftp.gnu.org/gnu/$1";
+               push @mirrors, "ftp://ftp.mirror.nl/pub/mirror/gnu/$1";
+               push @mirrors, "http://mirror.switch.ch/ftp/mirror/gnu/$1";
+               push @mirrors, "ftp://ftp.uu.net/archive/systems/gnu/$1";
+               push @mirrors, "ftp://ftp.eu.uu.net/pub/gnu/$1";
+               push @mirrors, "ftp://ftp.leo.org/pub/comp/os/unix/gnu/$1";
+               push @mirrors, "ftp://ftp.digex.net/pub/gnu/$1";
+       } elsif ($mirror =~ /^\@KERNEL\/(.+)$/) {
+               push @mirrors, "ftp://ftp.us.kernel.org/pub/$1";
+               push @mirrors, "http://ftp.us.kernel.org/pub/$1";
+               push @mirrors, "ftp://ftp.kernel.org/pub/$1";
+               push @mirrors, "http://ftp.kernel.org/pub/$1";
+               push @mirrors, "ftp://ftp.de.kernel.org/pub/$1";
+               push @mirrors, "http://ftp.de.kernel.org/pub/$1";
+               push @mirrors, "ftp://ftp.fr.kernel.org/pub/$1";
+               push @mirrors, "http://ftp.fr.kernel.org/pub/$1";
        } else {
                push @mirrors, $mirror;
        }
index da98c999e67f2167b9de91d74de508444278975b..3d2735d0f13049b62f169bf6526bb206af656cc1 100755 (executable)
@@ -391,10 +391,9 @@ sub readInFirmware {
     my($filename, $partitions_ref) = @_;
 
     my($firmware_buf);
-    my($total_length)   = 0x800000;
 
     open FILE,$filename or die "Can't find firmware image \"$filename\": $!\n";
-    read FILE,$firmware_buf,$total_length or die "Can't read $total_length bytes from \"$filename\": $!\n";
+    read FILE,$firmware_buf,$flash_len or die "Can't read $flash_len bytes from \"$filename\": $!\n";
     close FILE or die "Can't close \"$filename\": $!\n";
 
     $debug and printf("Read 0x%08X bytes from \"%s\"\n", length($firmware_buf), $filename);
@@ -930,7 +929,7 @@ sub defaultPartitions {
 
 # Main routine starts here ...
 
-my($unpack, $pack, $little, $input, $output, $redboot);
+my($unpack, $pack, $little, $fatflash, $input, $output, $redboot);
 my($kernel, $sysconf, $ramdisk, $fisdir);
 my($microcode, $trailer, $ethaddr, $loader);
 
@@ -946,6 +945,7 @@ if (!GetOptions("d|debug"       => \$debug,
                "u|unpack"      => \$unpack,
                "p|pack"        => \$pack,
                "l|little"      => \$little,
+               "F|fatflash"    => \$fatflash,
                "i|input=s"     => \$input,
                "o|output=s"    => \$output,
                "b|redboot=s"   => \$redboot,
@@ -965,6 +965,7 @@ if (!GetOptions("d|debug"       => \$debug,
     print "  [-u|--unpack]                     Unpack a firmware image\n";
     print "  [-p|--pack]                       Pack a firmware image\n";
     print "  [-l|--little]                     Convert Kernel and Ramdisk to little-endian\n";
+    print "  [-F|--fatflash]                   Generate an image for 16MB flash\n";
     print "  [-i|--input]     <file>           Input firmware image filename\n";
     print "  [-o|--output]    <file>           Output firmware image filename\n";
     print "  [-b|--redboot]   <file>           Input/Output RedBoot filename\n";
@@ -1047,6 +1048,18 @@ if (defined $little)  {
     } @partitions;
 }
 
+if (defined $fatflash)  {
+    $flash_len = 0x01000000;
+    map {
+       if (($_->{'name'} eq 'FIS directory') or
+           ($_->{'name'} eq 'Loader config') or
+           ($_->{'name'} eq 'Microcode') or
+           ($_->{'name'} eq 'Trailer')) {
+           $_->{'offset'} += 0x00800000;
+       }
+    } @partitions;
+}
+
 if (defined $ethaddr) {
     map {
        if ($_->{'name'} eq 'EthAddr') {
index a4c5cae0150822434544dd8412d6db9b5db9ee0a..90d1fa799ae5e4e5dd423ab0c3ab8c4f230aee93 100755 (executable)
@@ -13,7 +13,7 @@ sub get_ts($$) {
        my $options = shift;
        my $ts = 0;
        my $fn = "";
-       open FIND, "find $path -not -path \\*.svn\\* -and -not -path \\*CVS\\* $options 2>/dev/null |";
+       open FIND, "find $path -type f -and -not -path \\*.svn\\* -and -not -path \\*CVS\\* $options 2>/dev/null |";
        while (<FIND>) {
                chomp;
                my $file = $_;
@@ -36,15 +36,18 @@ while (@ARGV > 0) {
        my $path = shift @ARGV;
        if ($path =~ /^-x/) {
                my $str = shift @ARGV;
-               $options{"findopts"} .= " -and -not -path \\*".$str."\\*"
+               $options{"findopts"} .= " -and -not -path '".$str."'"
        } elsif ($path =~ /^-f/) {
                $options{"findopts"} .= " -follow";
+       } elsif ($path =~ /^-n/) {
+               my $arg = $ARGV[0];
+               $options{$path} = $arg;
        } elsif ($path =~ /^-/) {
                $options{$path} = 1;
        } else {
                my ($tmp, $fname) = get_ts($path, $options{"findopts"});
                if ($tmp > $ts) {
-                       if ($options{'-f'}) {
+                       if ($options{'-F'}) {
                                $n = $fname;
                        } else {
                                $n = $path;
@@ -54,7 +57,9 @@ while (@ARGV > 0) {
        }
 }
 
-if ($options{"-p"}) {
+if ($options{"-n"}) {
+       exit ($n eq $options{"-n"} ? 0 : 1);
+} elsif ($options{"-p"}) {
        print "$n\n";
 } elsif ($options{"-t"}) {
        print "$ts\n";
index 8d204862ca8a661f712b2d93a9c95135587c5785..2b56963365d36adfdb8be96d15b6a65369729df6 100755 (executable)
@@ -111,6 +111,11 @@ start() {
                        c["vlan0ports"]="1 2 3 4 5*"
                        c["vlan1ports"]="0 5"
                }
+
+               if (model == "Motorola WR850G V2/V3") {
+                       c["vlan0ports"]="0 1 2 3 5*"
+                       c["vlan1ports"]="4 5"
+               }
                
                print "#### VLAN configuration "
                print "config switch eth0"
index 2cf91f202e4dc61eaa4849c21b7ac8c3dca60a3c..9c502be5802bf96091a7bf6d37fa23b9c1171d12 100644 (file)
@@ -99,6 +99,17 @@ static struct irqaction bcm947xx_timer_irqaction = {
 void __init
 bcm947xx_timer_setup(struct irqaction *irq)
 {
+       int x;
+
        /* Enable the timer interrupt */
        setup_irq(7, &bcm947xx_timer_irqaction);
+
+       sti();
+
+       for (x=0; x<5; x++) {
+               unsigned long ticks; 
+               ticks = jiffies;
+               while (ticks == jiffies) 
+                       /* do nothing */;
+       }
 }
index c653c6a3f32f3943cbee0757bbf87739c479e2da..bae70d41b6945aa88efabeabee02e7d01ac4e8dc 100644 (file)
@@ -32,7 +32,7 @@ diff -urN linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c linux-2.6.21.1.dev/
 +      if (!mtdname)
 +              mtdname = devname;
 +
-+      dev->mtd.name = kmalloc(strlen(mtdname), GFP_KERNEL);
++      dev->mtd.name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL);
 +
        if (!dev->mtd.name)
                goto devinit_err;
index 57a8615a02f63c7efa70a8e6817f6523b52d7f96..bdb19eeccba9e18fee7f629d4744f5b1ec61cbee 100644 (file)
@@ -32,7 +32,7 @@ diff -urN linux-2.6.21.1.old/drivers/mtd/devices/block2mtd.c linux-2.6.21.1.dev/
 +      if (!mtdname)
 +              mtdname = devname;
 +
-+      dev->mtd.name = kmalloc(strlen(mtdname), GFP_KERNEL);
++      dev->mtd.name = kmalloc(strlen(mtdname) + 1, GFP_KERNEL);
 +
        if (!dev->mtd.name)
                goto devinit_err;
diff --git a/target/linux/rb532-2.6/files/arch/mips/rb500/prom.c.orig b/target/linux/rb532-2.6/files/arch/mips/rb500/prom.c.orig
deleted file mode 100644 (file)
index 47569c0..0000000
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
-* 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/autoconf.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);
-
-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);
-
-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 --git a/tools/ipkg-utils/patches/150-uppercase_letters.patch b/tools/ipkg-utils/patches/150-uppercase_letters.patch
new file mode 100644 (file)
index 0000000..debafb2
--- /dev/null
@@ -0,0 +1,26 @@
+Index: ipkg-utils-1.7/ipkg-build
+===================================================================
+--- ipkg-utils-1.7.orig/ipkg-build     2007-07-21 03:10:58.228362436 +0200
++++ ipkg-utils-1.7/ipkg-build  2007-07-21 03:11:02.912629374 +0200
+@@ -133,7 +133,7 @@
+       disallowed_filename=`disallowed_field Filename`
+       [ "$?" -ne 0 ] && PKG_ERROR=1
+-      if echo $pkg | grep '[^a-z0-9.+-]'; then
++      if echo $pkg | grep '[^a-zA-Z0-9.+-]'; then
+               echo "*** Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])" >&2
+               PKG_ERROR=1;
+       fi
+Index: ipkg-utils-1.7/ipkg-buildpackage
+===================================================================
+--- ipkg-utils-1.7.orig/ipkg-buildpackage      2007-07-21 03:10:43.859543602 +0200
++++ ipkg-utils-1.7/ipkg-buildpackage   2007-07-21 03:10:52.212019583 +0200
+@@ -69,7 +69,7 @@
+       required_field Maintainer >/dev/null
+       required_field Description >/dev/null
+-      if echo $pkg | grep '[^a-z0-9.+-]'; then
++      if echo $pkg | grep '[^a-zA-Z0-9.+-]'; then
+               echo "ipkg-build: Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])"
+               PKG_ERROR=1;
+       fi