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
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 \
))
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}
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
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)" \
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
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
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.
+
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.
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}
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}
config wifi-device "wifi0"
option type "atheros"
option channel "5"
- option mode "11g"
+ option agmode "11g"
config wifi-iface
option device "wifi0"
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
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
\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}
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++, \
#
-# 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.
$$(eval $$(call Require,$(1),$(2)))
endef
+define RequireHeader
+ define Require/$(1)
+ [ -e "$(1)" ]
+ endef
+
+ $$(eval $$(call Require,$(1),$(2)))
+endef
+
+.NOTPARALLEL:
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/
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
}
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}
}
[ ifup = "$ACTION" ] && {
uci set "/var/state/network.$INTERFACE.up=1"
- [ -z "$DEVICE" ] || {
- uci set "/var/state/network.$INTERFACE.ifname=$DEVICE"
- }
}
-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
# 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() {(
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
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'"
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=broadcom-diag
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
/* D-Link */
DIR130,
DIR330,
+ DWL3150,
};
static void __init bcm4780_init(void) {
.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 },
},
},
{ .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)
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;
}
{
struct proc_dir_entry *p;
u32 mask = 0;
+ u32 oe_mask = 0;
u32 val = 0;
leds = proc_mkdir("led", diag);
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;
}
}
- gpio_outen(mask, mask);
+ gpio_outen(mask, oe_mask);
gpio_control(mask, 0);
gpio_out(mask, val);
}
enum polarity_t {
REVERSE = 0,
NORMAL = 1,
+ INPUT = 2,
};
enum {
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
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
/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) \
#!/bin/sh /etc/rc.common
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2007 OpenWrt.org
START=60
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: 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: 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>
+++ /dev/null
-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)))
- {
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
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
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
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: 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: 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) {
+++ /dev/null
-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: 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
case 'F':
case 'e':
case 'c':
-@@ -214,7 +218,6 @@
+@@ -230,7 +234,6 @@
#ifndef ENABLE_CLI_LOCALTCPFWD
case 'L':
#endif
+++ /dev/null
-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: 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: 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);
}
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
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/
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
SUBSYSTEM ~~ (net|button|usb) {
exec /sbin/hotplug-call %SUBSYSTEM%;
}
+
+DEVICENAME ~~ (watchdog) {
+ exec /sbin/watchdog -t 5 /dev/watchdog;
+ next
+}
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/
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/
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)
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)
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:= \
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)" \
*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"
--- /dev/null
+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;
+++ /dev/null
-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 */
--- /dev/null
+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];
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/
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() {
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
${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}"
}
/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" \
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
}
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
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)
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
!*) 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"
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
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
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/
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
--- /dev/null
+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
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/
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)" \
[ -e "$CTLFILE" ] || exit
-/etc/init.d/ipsec restart
+/etc/init.d/ipsec update
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=kmod-wlcompat
-PKG_RELEASE:=5
+PKG_RELEASE:=6
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)
/* 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 */
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
$(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
}
-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};
}
}
} 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);
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;
}
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);
# 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);
"u|unpack" => \$unpack,
"p|pack" => \$pack,
"l|little" => \$little,
+ "F|fatflash" => \$fatflash,
"i|input=s" => \$input,
"o|output=s" => \$output,
"b|redboot=s" => \$redboot,
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";
} @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') {
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 = $_;
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;
}
}
-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";
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"
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 */;
+ }
}
+ 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;
+ 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;
+++ /dev/null
-/*
-* 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);
-}
-
--- /dev/null
+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