1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

Merge commit 'nbd/master' into xburst

This commit is contained in:
Lars-Peter Clausen
2010-04-14 16:51:33 +02:00
482 changed files with 92825 additions and 3038 deletions

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2006,2007 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,14 +8,9 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
IMGNAME := $(BIN_DIR)/openwrt-$(BOARD)
JFFS2BLOCK := $(KDIR)/jffs2.block
JFFS2MARK := $(KDIR)/jffs2.mark
define imgname
$(IMGNAME)-$(2)-$(patsubst jffs2-%,jffs2,$(1))
endef
define Build/Clean
$(LOADER_MAKE) clean
endef
@@ -39,7 +34,7 @@ endef
define Image/Build/LZMAKernel
$(LOADER_MAKE) TARGET_DIR=$(BIN_DIR) \
LOADER=openwrt-$(BOARD)-$(1)-ramfs.$(2) \
LOADER=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-ramfs.$(2) \
LOADER_DATA=$(KDIR)/vmlinux.lzma \
LZMA_TEXT_START=$(3) LZMA_STARTUP_ORG=$(4) \
CONFIG_PASS_KARGS=$(5) CONFIG_BOARD=$(6) \

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -14,15 +14,15 @@ define Image/BuildKernel
-n 'MIPS OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.lzma $(KDIR)/uImage
cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(BIN_DIR)/openwrt-$(BOARD)-$(1).image)
$(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).image)
endef
define Image/Build
cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).image
cat $(KDIR)/uImage $(KDIR)/root.$(1) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).image
$(call Image/Build/$(1),$(1))
endef

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -57,12 +57,12 @@ bs=65536 conv=sync
endef
define Image/Build/CyberTAN
(dd if=/dev/zero bs=16 count=1; cat $(BIN_DIR)/openwrt-$(BOARD)-$(1).bin) | \
(dd if=/dev/zero bs=16 count=1; cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin) | \
$(STAGING_DIR_HOST)/bin/addpattern -p $(3) -o $(BIN_DIR)/openwrt-$(2)-$(4)-code.bin
endef
#define Image/Build/sErCoMm
# cat sercomm/adam2.bin "$(BIN_DIR)/openwrt-$(BOARD)-$(1).bin" > "$(KDIR)/dgfw.tmp"
# cat sercomm/adam2.bin "$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin" > "$(KDIR)/dgfw.tmp"
# dd if=sercomm/$(2) of="$(KDIR)/dgfw.tmp" bs=$$$$((0x3e0000 - 80)) seek=1 conv=notrunc
# $(STAGING_DIR_HOST)/bin/dgfirmware -f -w "$(BIN_DIR)/openwrt-$(2)-$(3).img" "$(KDIR)/dgfw.tmp"
# rm -f "$(KDIR)/dgfw.tmp"
@@ -76,9 +76,9 @@ define Image/Build/EVA
endef
define Image/Build
dd if=$(KDIR)/loader.bin $(call align/$(1)) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).bin
cat $(KDIR)/root.$(1) >> $(BIN_DIR)/openwrt-$(BOARD)-$(1).bin
$(call prepare_generic_squashfs,$(BIN_DIR)/openwrt-$(BOARD)-$(1).bin)
dd if=$(KDIR)/loader.bin $(call align/$(1)) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
cat $(KDIR)/root.$(1) >> $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin
$(call prepare_generic_squashfs,$(BIN_DIR)/$(IMG_PREFIX)-$(1).bin)
$(call Image/Build/CyberTAN,$(1),AG1B,AG1B,$(1))
$(call Image/Build/CyberTAN,$(1),AG1A,AG1A,$(1))
$(call Image/Build/CyberTAN,$(1),WA21,WA21,$(1))

View File

@@ -0,0 +1,26 @@
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth1
option proto dhcp
config switch
option name eth0
option reset 1
option enable_vlan 1
config switch_vlan
option device eth0
option vlan 1
option ports '0 1 2 3 4'

View File

@@ -0,0 +1,26 @@
config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
config interface lan
option ifname eth1
option type bridge
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
config interface wan
option ifname eth0
option proto dhcp
config switch
option name eth1
option reset 1
option enable_vlan 1
config switch_vlan
option device eth1
option vlan 1
option ports "0 1 2 3 4"

View File

@@ -14,3 +14,13 @@ config interface lan
config interface wan
option ifname eth0
option proto dhcp
config switch
option name eth1
option reset 1
option enable_vlan 1
config switch_vlan
option device eth1
option vlan 1
option ports "0 1 2 3 4"

View File

@@ -14,3 +14,13 @@ config interface lan
config interface wan
option ifname eth1
option proto dhcp
config switch
option name eth0
option reset 1
option enable_vlan 1
config switch_vlan
option device eth0
option vlan 1
option ports '0 1 2 3 4'

View File

@@ -44,6 +44,7 @@ CONFIG_AR71XX_MACH_WRT400N=y
CONFIG_AR71XX_MACH_WZR_HP_G300NH=y
CONFIG_AR71XX_NVRAM=y
CONFIG_AR71XX_WDT=y
CONFIG_AR8216_PHY=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y

View File

@@ -44,6 +44,7 @@ CONFIG_AR71XX_MACH_WRT400N=y
CONFIG_AR71XX_MACH_WZR_HP_G300NH=y
CONFIG_AR71XX_NVRAM=y
CONFIG_AR71XX_WDT=y
CONFIG_AR8216_PHY=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y

View File

@@ -43,6 +43,7 @@ CONFIG_AR71XX_MACH_WRT400N=y
CONFIG_AR71XX_MACH_WZR_HP_G300NH=y
CONFIG_AR71XX_NVRAM=y
CONFIG_AR71XX_WDT=y
CONFIG_AR8216_PHY=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y

View File

@@ -128,6 +128,11 @@ static struct gpio_button dir_615c1_gpio_buttons[] __initdata = {
}
};
#define DIR_615C1_LAN_PHYMASK BIT(0)
#define DIR_615C1_WAN_PHYMASK BIT(4)
#define DIR_615C1_MDIO_MASK (~(DIR_615C1_LAN_PHYMASK | \
DIR_615C1_WAN_PHYMASK))
static void __init dir_615c1_setup(void)
{
const char *config = (char *) KSEG1ADDR(DIR_615C1_CONFIG_ADDR);
@@ -141,14 +146,13 @@ static void __init dir_615c1_setup(void)
wlan_mac = mac;
}
ar71xx_add_device_mdio(0x0);
ar71xx_add_device_mdio(DIR_615C1_MDIO_MASK);
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth0_data.speed = SPEED_100;
ar71xx_eth0_data.duplex = DUPLEX_FULL;
ar71xx_eth0_data.phy_mask = DIR_615C1_LAN_PHYMASK;
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth1_data.phy_mask = 0x10;
ar71xx_eth1_data.phy_mask = DIR_615C1_WAN_PHYMASK;
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(1);

View File

@@ -126,13 +126,16 @@ static struct gpio_button mzk_w04nu_gpio_buttons[] __initdata = {
}
};
#define MZK_W04NU_WAN_PHYMASK BIT(4)
#define MZK_W04NU_MDIO_MASK (~MZK_W04NU_WAN_PHYMASK)
static void __init mzk_w04nu_setup(void)
{
u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
ar71xx_set_mac_base(eeprom);
ar71xx_add_device_mdio(0x0);
ar71xx_add_device_mdio(MZK_W04NU_MDIO_MASK);
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth0_data.speed = SPEED_100;
@@ -140,7 +143,7 @@ static void __init mzk_w04nu_setup(void)
ar71xx_eth0_data.has_ar8216 = 1;
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth1_data.phy_mask = 0x10;
ar71xx_eth1_data.phy_mask = MZK_W04NU_WAN_PHYMASK;
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(1);

View File

@@ -125,13 +125,16 @@ static struct gpio_button mzk_w300nh_gpio_buttons[] __initdata = {
}
};
#define MZK_W300NH_WAN_PHYMASK BIT(4)
#define MZK_W300NH_MDIO_MASK (~MZK_W300NH_WAN_PHYMASK)
static void __init mzk_w300nh_setup(void)
{
u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
ar71xx_set_mac_base(eeprom);
ar71xx_add_device_mdio(0x0);
ar71xx_add_device_mdio(MZK_W300NH_MDIO_MASK);
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth0_data.speed = SPEED_100;
@@ -139,7 +142,7 @@ static void __init mzk_w300nh_setup(void)
ar71xx_eth0_data.has_ar8216 = 1;
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth1_data.phy_mask = 0x10;
ar71xx_eth1_data.phy_mask = MZK_W300NH_WAN_PHYMASK;
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(1);

View File

@@ -89,7 +89,7 @@ static void __init pb92_init(void)
ar71xx_add_device_mdio(~0);
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth0_data.speed = SPEED_100;
ar71xx_eth0_data.speed = SPEED_1000;
ar71xx_eth0_data.duplex = DUPLEX_FULL;
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;

View File

@@ -239,6 +239,7 @@ static void __init rb450_generic_setup(int gige)
ar71xx_add_device_mdio(0xffffffe0);
ar71xx_eth0_data.phy_if_mode = (gige) ? PHY_INTERFACE_MODE_RGMII : PHY_INTERFACE_MODE_MII;
ar71xx_eth0_data.phy_mask = (gige) ? (1 << 0) : 0;
ar71xx_eth0_data.speed = (gige) ? SPEED_1000 : SPEED_100;
ar71xx_eth0_data.duplex = DUPLEX_FULL;

View File

@@ -104,6 +104,11 @@ static struct gpio_button tew_632brp_gpio_buttons[] __initdata = {
}
};
#define TEW_632BRP_LAN_PHYMASK BIT(0)
#define TEW_632BRP_WAN_PHYMASK BIT(4)
#define TEW_632BRP_MDIO_MASK (~(TEW_632BRP_LAN_PHYMASK | \
TEW_632BRP_WAN_PHYMASK))
static void __init tew_632brp_setup(void)
{
const char *config = (char *) KSEG1ADDR(TEW_632BRP_CONFIG_ADDR);
@@ -117,14 +122,13 @@ static void __init tew_632brp_setup(void)
wlan_mac = mac;
}
ar71xx_add_device_mdio(0x0);
ar71xx_add_device_mdio(TEW_632BRP_MDIO_MASK);
ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth0_data.speed = SPEED_100;
ar71xx_eth0_data.duplex = DUPLEX_FULL;
ar71xx_eth0_data.phy_mask = TEW_632BRP_LAN_PHYMASK;
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
ar71xx_eth1_data.phy_mask = 0x10;
ar71xx_eth1_data.phy_mask = TEW_632BRP_WAN_PHYMASK;
ar71xx_add_device_eth(0);
ar71xx_add_device_eth(1);

View File

@@ -177,6 +177,7 @@ static void __init ubnt_rspro_setup(void)
ar71xx_eth0_data.phy_mask = UBNT_RSPRO_WAN_PHYMASK;
ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
ar71xx_eth1_data.phy_mask = UBNT_RSPRO_LAN_PHYMASK;
ar71xx_eth1_data.speed = SPEED_1000;
ar71xx_eth1_data.duplex = DUPLEX_FULL;

View File

@@ -38,7 +38,7 @@
#define ETH_FCS_LEN 4
#define AG71XX_DRV_NAME "ag71xx"
#define AG71XX_DRV_VERSION "0.5.33"
#define AG71XX_DRV_VERSION "0.5.35"
#define AG71XX_NAPI_WEIGHT 64
#define AG71XX_OOM_REFILL (1 + HZ/10)
@@ -455,7 +455,8 @@ static void inline ag71xx_mii_ctrl_set_speed(struct ag71xx *ag,
#ifdef CONFIG_AG71XX_AR8216_SUPPORT
void ag71xx_add_ar8216_header(struct ag71xx *ag, struct sk_buff *skb);
int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb);
int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb,
int pktlen);
static inline int ag71xx_has_ar8216(struct ag71xx *ag)
{
return ag71xx_get_pdata(ag)->has_ar8216;
@@ -467,7 +468,8 @@ static inline void ag71xx_add_ar8216_header(struct ag71xx *ag,
}
static inline int ag71xx_remove_ar8216_header(struct ag71xx *ag,
struct sk_buff *skb)
struct sk_buff *skb,
int pktlen)
{
return 0;
}

View File

@@ -25,19 +25,21 @@ void ag71xx_add_ar8216_header(struct ag71xx *ag, struct sk_buff *skb)
skb->data[1] = 0x80;
}
int ag71xx_remove_ar8216_header(struct ag71xx *ag,
struct sk_buff *skb)
int ag71xx_remove_ar8216_header(struct ag71xx *ag, struct sk_buff *skb,
int pktlen)
{
u8 type;
type = skb->data[1] & AR8216_PACKET_TYPE_MASK;
switch (type) {
case AR8216_PACKET_TYPE_NORMAL:
skb_pull(skb, AR8216_HEADER_LEN);
break;
default:
return -EINVAL;
}
skb_put(skb, pktlen);
skb_pull(skb, AR8216_HEADER_LEN);
return 0;
}

View File

@@ -764,16 +764,25 @@ static int ag71xx_rx_copy_skb(struct ag71xx *ag, struct sk_buff **pskb,
{
struct sk_buff *copy_skb;
if (ag->phy_dev && (ag->phy_dev->pkt_align % 4) == 2)
goto keep;
copy_skb = netdev_alloc_skb(ag->dev, pktlen + NET_IP_ALIGN);
if (!copy_skb)
return -ENOMEM;
skb_reserve(copy_skb, NET_IP_ALIGN);
skb_copy_from_linear_data(*pskb, copy_skb->data, pktlen);
skb_put(copy_skb, pktlen);
dev_kfree_skb_any(*pskb);
*pskb = copy_skb;
return 0;
keep:
skb_put(*pskb, pktlen);
return 0;
}
static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
@@ -814,7 +823,7 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
dev->stats.rx_bytes += pktlen;
if (ag71xx_has_ar8216(ag))
err = ag71xx_remove_ar8216_header(ag, skb);
err = ag71xx_remove_ar8216_header(ag, skb, pktlen);
else
err = ag71xx_rx_copy_skb(ag, &skb, pktlen);
@@ -822,12 +831,14 @@ static int ag71xx_rx_packets(struct ag71xx *ag, int limit)
dev->stats.rx_dropped++;
kfree_skb(skb);
} else {
skb_put(skb, pktlen);
skb->dev = dev;
skb->ip_summed = CHECKSUM_NONE;
skb->protocol = eth_type_trans(skb, dev);
netif_receive_skb(skb);
if (ag->phy_dev) {
ag->phy_dev->netif_receive_skb(skb);
} else {
skb->protocol = eth_type_trans(skb, dev);
netif_receive_skb(skb);
}
}
ring->buf[i].skb = NULL;

View File

@@ -7,14 +7,12 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
IMGNAME:=$(BIN_DIR)/openwrt-$(BOARD)
define imgname
$(IMGNAME)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
$(BIN_DIR)/$(IMG_PREFIX)-$(2)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))
endef
VMLINUX:=$(IMGNAME)-vmlinux
UIMAGE:=$(IMGNAME)-uImage
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
fs_squash:=squashfs-only
fs_all:=all
fs_4k:=4k
@@ -26,8 +24,8 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
fs_4k:=initramfs
fs_64k:=initramfs
fs_128k:=initramfs
VMLINUX:=$(IMGNAME)-vmlinux-initramfs
UIMAGE:=$(IMGNAME)-uImage-initramfs
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux-initramfs
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs
endif
define CompressLzma
@@ -248,11 +246,11 @@ define Image/Build/UBNTXM
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
-k $(KDIR)/vmlinux-$(2).uImage \
-r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-factory.bin
( \
dd if=$(KDIR)/vmlinux-$(2).uImage; \
dd if=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1); \
dd if=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1); \
) > $(call imgname,$(1),$(2))-sysupgrade.bin
endef
@@ -262,11 +260,11 @@ define Image/Build/UBNT
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(4) -v $(5).$(6).OpenWrt.$(REVISION) \
-k $(KDIR)/vmlinux-$(2).lzma \
-r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-factory.bin
-sh $(TOPDIR)/scripts/combined-image.sh \
"$(KDIR)/vmlinux-$(2).lzma" \
"$(BIN_DIR)/openwrt-$(BOARD)-root.$(1)" \
"$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)" \
$(call imgname,$(1),$(2))-sysupgrade.bin
endef
@@ -298,12 +296,12 @@ define Image/Build/TPLINK
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-B $(4) -N OpenWrt -V $(REVISION)\
-k $(KDIR)/vmlinux-$(2).bin.gz \
-r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-factory.bin
-$(STAGING_DIR_HOST)/bin/mktplinkfw \
-B $(4) -N OpenWrt -V $(REVISION) -s \
-k $(KDIR)/vmlinux-$(2).bin.gz \
-r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(call imgname,$(1),$(2))-sysupgrade.bin
endef
@@ -586,8 +584,8 @@ define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
dd if=$(KDIR)/root.squashfs of=$(KDIR)/root.squashfs-4k.tmp0 bs=4k conv=sync
$(call add_jffs2_mark,$(KDIR)/root.squashfs-4k.tmp0)
dd if=$(KDIR)/root.squashfs-4k.tmp0 of=$(IMGNAME)-root.squashfs-4k bs=4k conv=sync
$(call add_jffs2_mark,$(IMGNAME)-root.squashfs-4k)
dd if=$(KDIR)/root.squashfs-4k.tmp0 of=$(BIN_DIR)/$(IMG_PREFIX)-root.squashfs-4k bs=4k conv=sync
$(call add_jffs2_mark,$(BIN_DIR)/$(IMG_PREFIX)-root.squashfs-4k)
rm -f $(KDIR)/root.squashfs-4k.tmp0
endef
@@ -597,7 +595,7 @@ endef
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(IMGNAME)-root.$(1) bs=128k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
$(call Image/Build/Profile/$(PROFILE),$(1))
endef

View File

@@ -1,56 +0,0 @@
--- a/arch/mips/kernel/cevt-r4k.c
+++ b/arch/mips/kernel/cevt-r4k.c
@@ -16,6 +16,22 @@
#include <asm/cevt-r4k.h>
/*
+ * Compare interrupt can be routed and latched outside the core,
+ * so a single execution hazard barrier may not be enough to give
+ * it time to clear as seen in the Cause register. 4 time the
+ * pipeline depth seems reasonably conservative, and empirically
+ * works better in configurations with high CPU/bus clock ratios.
+ */
+
+#define compare_change_hazard() \
+ do { \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ } while (0)
+
+/*
* The SMTC Kernel for the 34K, 1004K, et. al. replaces several
* of these routines with SMTC-specific variants.
*/
@@ -31,6 +47,7 @@ static int mips_next_event(unsigned long
cnt = read_c0_count();
cnt += delta;
write_c0_compare(cnt);
+ compare_change_hazard();
res = ((int)(read_c0_count() - cnt) > 0) ? -ETIME : 0;
return res;
}
@@ -100,22 +117,6 @@ static int c0_compare_int_pending(void)
return (read_c0_cause() >> cp0_compare_irq) & 0x100;
}
-/*
- * Compare interrupt can be routed and latched outside the core,
- * so a single execution hazard barrier may not be enough to give
- * it time to clear as seen in the Cause register. 4 time the
- * pipeline depth seems reasonably conservative, and empirically
- * works better in configurations with high CPU/bus clock ratios.
- */
-
-#define compare_change_hazard() \
- do { \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- } while (0)
-
int c0_compare_int_usable(void)
{
unsigned int delta;

View File

@@ -1,56 +0,0 @@
--- a/arch/mips/kernel/cevt-r4k.c
+++ b/arch/mips/kernel/cevt-r4k.c
@@ -16,6 +16,22 @@
#include <asm/cevt-r4k.h>
/*
+ * Compare interrupt can be routed and latched outside the core,
+ * so a single execution hazard barrier may not be enough to give
+ * it time to clear as seen in the Cause register. 4 time the
+ * pipeline depth seems reasonably conservative, and empirically
+ * works better in configurations with high CPU/bus clock ratios.
+ */
+
+#define compare_change_hazard() \
+ do { \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ } while (0)
+
+/*
* The SMTC Kernel for the 34K, 1004K, et. al. replaces several
* of these routines with SMTC-specific variants.
*/
@@ -31,6 +47,7 @@ static int mips_next_event(unsigned long
cnt = read_c0_count();
cnt += delta;
write_c0_compare(cnt);
+ compare_change_hazard();
res = ((int)(read_c0_count() - cnt) > 0) ? -ETIME : 0;
return res;
}
@@ -100,22 +117,6 @@ static int c0_compare_int_pending(void)
return (read_c0_cause() >> cp0_compare_irq_shift) & (1ul << CAUSEB_IP);
}
-/*
- * Compare interrupt can be routed and latched outside the core,
- * so a single execution hazard barrier may not be enough to give
- * it time to clear as seen in the Cause register. 4 time the
- * pipeline depth seems reasonably conservative, and empirically
- * works better in configurations with high CPU/bus clock ratios.
- */
-
-#define compare_change_hazard() \
- do { \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- } while (0)
-
int c0_compare_int_usable(void)
{
unsigned int delta;

View File

@@ -1,56 +0,0 @@
--- a/arch/mips/kernel/cevt-r4k.c
+++ b/arch/mips/kernel/cevt-r4k.c
@@ -16,6 +16,22 @@
#include <asm/cevt-r4k.h>
/*
+ * Compare interrupt can be routed and latched outside the core,
+ * so a single execution hazard barrier may not be enough to give
+ * it time to clear as seen in the Cause register. 4 time the
+ * pipeline depth seems reasonably conservative, and empirically
+ * works better in configurations with high CPU/bus clock ratios.
+ */
+
+#define compare_change_hazard() \
+ do { \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ irq_disable_hazard(); \
+ } while (0)
+
+/*
* The SMTC Kernel for the 34K, 1004K, et. al. replaces several
* of these routines with SMTC-specific variants.
*/
@@ -31,6 +47,7 @@ static int mips_next_event(unsigned long
cnt = read_c0_count();
cnt += delta;
write_c0_compare(cnt);
+ compare_change_hazard();
res = ((int)(read_c0_count() - cnt) > 0) ? -ETIME : 0;
return res;
}
@@ -100,22 +117,6 @@ static int c0_compare_int_pending(void)
return (read_c0_cause() >> cp0_compare_irq_shift) & (1ul << CAUSEB_IP);
}
-/*
- * Compare interrupt can be routed and latched outside the core,
- * so a single execution hazard barrier may not be enough to give
- * it time to clear as seen in the Cause register. 4 time the
- * pipeline depth seems reasonably conservative, and empirically
- * works better in configurations with high CPU/bus clock ratios.
- */
-
-#define compare_change_hazard() \
- do { \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- irq_disable_hazard(); \
- } while (0)
-
int c0_compare_int_usable(void)
{
unsigned int delta;

View File

@@ -50,3 +50,14 @@ define Profile/PB44/Description
endef
$(eval $(call Profile,PB44))
define Profile/PB92
NAME:=Atheros PB92 reference board
PACKAGES:=wpad-mini kmod-ath9k kmod-usb-core kmod-usb2
endef
define Profile/PB92/Description
Package set optimized for the Atheros PB92 reference board.
endef
$(eval $(call Profile,PB92))

View File

@@ -1,10 +1,9 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
@@ -30,14 +29,14 @@ define Image/Prepare
endef
define Image/BuildKernel
cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build
dd if=$(KDIR)/uImage of=$(KDIR)/uImage.block bs=8448 conv=sync
dd if=$(KDIR)/root.squashfs of=$(KDIR)/root.block bs=8448 conv=sync
cat $(KDIR)/uImage.block $(KDIR)/root.block > $(KDIR)/knlroot.bin
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD).trx -f $(KDIR)/dfboot.bin -f$(KDIR)/u-boot.full -f$(KDIR)/knlroot.bin
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX).trx -f $(KDIR)/dfboot.bin -f$(KDIR)/u-boot.full -f$(KDIR)/knlroot.bin
cp $(KDIR)/dfbptest.bin $(BIN_DIR)
$(call Image/Build/$(1),$(1))
endef

View File

@@ -29,5 +29,7 @@ preinit_ip_deconfig() {
-e "/sys/bus/mdio_bus/drivers/Marvell 88E6060/0:10" ]; then
vconfig rem eth0.1 2>/dev/null
ifconfig $pi_ifname down
elif [ -n "$pi_ifname" ]; then
ifconfig $pi_ifname 0.0.0.0
fi
}

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
gzip -9 -c $(KDIR)/vmlinux > $(KDIR)/vmlinux.bin.gz
$(STAGING_DIR_HOST)/bin/lzma e $(KDIR)/vmlinux $(KDIR)/vmlinux.bin.l7
dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma bs=65536 conv=sync
dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.gz bs=65536 conv=sync
dd if=$(KDIR)/vmlinux.bin.l7 of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma bs=65536 conv=sync
dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.gz bs=65536 conv=sync
endef
define Image/Build/squashfs
@@ -21,41 +21,41 @@ endef
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS2 -v XS2.ar2316.OpenWrt.$(REVISION) \
-k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \
-r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-$(1).bin
-k $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(BIN_DIR)/$(IMG_PREFIX)-ubnt2-$(1).bin
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS5 -v XS5.ar2313.OpenWrt.$(REVISION) \
-k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \
-r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-o $(BIN_DIR)/openwrt-$(BOARD)-ubnt5-$(1).bin
-k $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(BIN_DIR)/$(IMG_PREFIX)-ubnt5-$(1).bin
-$(STAGING_DIR_HOST)/bin/mkfwimage \
-B XS2-8 -v XS2.ar2316.OpenWrt.$(REVISION) \
-k $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma \
-r $(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
-o $(BIN_DIR)/openwrt-$(BOARD)-ubnt2-pico2-$(1).bin
-k $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma \
-r $(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
-o $(BIN_DIR)/$(IMG_PREFIX)-ubnt2-pico2-$(1).bin
-$(STAGING_DIR_HOST)/bin/mkmylofw -B np25g \
-p0x020000:0x130000:ah:0x80041000:linux:$(KDIR)/vmlinux.bin.gz \
-p0x150000:0x2a0000:::rootfs:$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
$(BIN_DIR)/openwrt-$(BOARD)-np25g-$(1).bin
-p0x150000:0x2a0000:::rootfs:$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
$(BIN_DIR)/$(IMG_PREFIX)-np25g-$(1).bin
-$(STAGING_DIR_HOST)/bin/mkmylofw -B wpe53g \
-p0x020000:0x130000:ah:0x80041000:linux:$(KDIR)/vmlinux.bin.gz \
-p0x150000:0x2a0000:::rootfs:$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) \
$(BIN_DIR)/openwrt-$(BOARD)-wpe53g-$(1).bin
-p0x150000:0x2a0000:::rootfs:$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) \
$(BIN_DIR)/$(IMG_PREFIX)-wpe53g-$(1).bin
ifeq ($(BOARD),atheros)
-sh $(TOPDIR)/scripts/combined-image.sh \
"$(BIN_DIR)/openwrt-$(BOARD)-vmlinux.lzma" \
"$(BIN_DIR)/openwrt-$(BOARD)-root.$(1)" \
"$(BIN_DIR)/openwrt-$(BOARD)-combined.$(1).img"
"$(BIN_DIR)/$(IMG_PREFIX)-vmlinux.lzma" \
"$(BIN_DIR)/$(IMG_PREFIX)-root.$(1)" \
"$(BIN_DIR)/$(IMG_PREFIX)-combined.$(1).img"
endif
endef

View File

@@ -30,7 +30,7 @@
if (ar231x_mdiobus_probe(dev) != 0) {
printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name);
rx_tasklet_cleanup(dev);
@@ -334,8 +350,10 @@ static int __exit ar231x_remove(struct p
@@ -334,8 +350,10 @@ static int __devexit ar231x_remove(struc
rx_tasklet_cleanup(dev);
ar231x_init_cleanup(dev);
unregister_netdev(dev);

View File

@@ -30,7 +30,7 @@
if (ar231x_mdiobus_probe(dev) != 0) {
printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name);
rx_tasklet_cleanup(dev);
@@ -334,8 +350,10 @@ static int __exit ar231x_remove(struct p
@@ -334,8 +350,10 @@ static int __devexit ar231x_remove(struc
rx_tasklet_cleanup(dev);
ar231x_init_cleanup(dev);
unregister_netdev(dev);

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -51,17 +51,17 @@ define Image/Prepare
endef
define Image/Build/Initramfs
$(OBJCOPY_SREC) $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.srec
$(OBJCOPY_SREC) $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.srec
endef
define Image/Build
$(TARGET_CROSS)objcopy -O srec -I binary --adjust-vma $(FLASH_FS) $(KDIR)/root.$(1) $(KDIR)/root.$(1).srec
grep -v S7 $(KDIR)/root.$(1).srec > $(BIN_DIR)/openwrt-$(BOARD)-$(1).srec
grep -v S0 $(KDIR)/kernel.flash.srec >> $(BIN_DIR)/openwrt-$(BOARD)-$(1).srec
$(INSTALL_BIN) $(KDIR)/kernel.flash.bin $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.bin
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1).fs
$(CP) $(KDIR)/kernel.flash.srec $(BIN_DIR)/openwrt-$(BOARD)-vmlinux-flash.srec
$(CP) $(KDIR)/kernel.ram.srec $(BIN_DIR)/openwrt-$(BOARD)-vmlinux-ram.srec
grep -v S7 $(KDIR)/root.$(1).srec > $(BIN_DIR)/$(IMG_PREFIX)-$(1).srec
grep -v S0 $(KDIR)/kernel.flash.srec >> $(BIN_DIR)/$(IMG_PREFIX)-$(1).srec
$(INSTALL_BIN) $(KDIR)/kernel.flash.bin $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.bin
$(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1).fs
$(CP) $(KDIR)/kernel.flash.srec $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-flash.srec
$(CP) $(KDIR)/kernel.ram.srec $(BIN_DIR)/$(IMG_PREFIX)-vmlinux-ram.srec
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
$(call Image/Build/Initramfs)
endif

View File

@@ -1,10 +1,9 @@
#
# Copyright (C) 2007-2008 OpenWrt.org
# Copyright (C) 2007-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
@@ -23,7 +22,7 @@ define Image/Prepare
endef
define Image/BuildKernel
cp $(KDIR)/uImage $(BIN_DIR)/openwrt-$(BOARD)-uImage
cp $(KDIR)/uImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
$(STAGING_DIR_HOST)/bin/lzma e $(LINUX_DIR)/arch/avr32/boot/images/vmlinux.bin $(KDIR)/vmlinux.lzma
mkimage -A avr32 -O linux -T kernel -a 0x10000000 -C lzma \
@@ -31,7 +30,7 @@ define Image/BuildKernel
-n 'OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.lzma $(KDIR)/uImage-lzma
cp $(KDIR)/uImage-lzma $(BIN_DIR)/openwrt-$(BOARD)-uImage-lzma
cp $(KDIR)/uImage-lzma $(BIN_DIR)/$(IMG_PREFIX)-uImage-lzma
endef
define Image/Build
@@ -43,14 +42,14 @@ define Image/Build/squashfs
( \
dd if=$(KDIR)/uImage bs=1024k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
define Image/Build/jffs2-64k
( \
dd if=$(KDIR)/uImage bs=1024k conv=sync; \
dd if=$(KDIR)/root.$(1) bs=64k conv=sync; \
) > $(BIN_DIR)/openwrt-$(BOARD)-$(1).img
) > $(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
$(eval $(call BuildImage))

View File

@@ -112,9 +112,9 @@ start() {
c["wan_ifname"] = "eth1"
c["lan_ifname"] = "eth0"
}
if (model == "ASUS WL-500g Premium V2") {
c["vlan0ports"] = "0 1 2 3 5"
c["vlan1ports"] = "4 5"
if ((model == "ASUS WL-500g Premium V2") || (model == "Dell TrueMobile 2300 v2") || (model == "Buffalo WHR-G125")) {
c["vlan0ports"] = "0 1 2 3 5"
c["vlan1ports"] = "4 5"
}
if (model == "Dell TrueMobile 2300") {
c["lan_ifname"] = "eth0"
@@ -122,20 +122,12 @@ start() {
c["vlan0ports"] = "0 1 2 3 4 5u"
c["vlan1ports"] = ""
}
if (model == "Dell TrueMobile 2300 v2") {
c["vlan0ports"] = "0 1 2 3 5"
c["vlan1ports"] = "4 5"
}
if (nvram["boardtype"] == "bcm94710r4") {
# Toshiba WRC-1000
c["lan_ifname"] = "eth0"
c["wan_ifname"] = "eth1"
}
if (nvram["boardtype"] == "wgt634u") {
c["vlan0ports"] = "0 1 2 3 5"
c["vlan1ports"] = "4 5"
}
if (nvram["boardtype"] == "0x0467") {
if ((nvram["boardtype"] == "wgt634u") || (nvram["boardtype"] == "0x0467")) {
c["vlan0ports"] = "0 1 2 3 5"
c["vlan1ports"] = "4 5"
}

View File

@@ -0,0 +1,33 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2010 OpenWrt.org
START=41
boot() {
[ -d /sys/class/ieee80211 ] || exit
commit=0
fixup_wmac() {
local cfg="$1"
local cfmac
config_get cfmac "$cfg" macaddr
[ "$cfmac" != "00:90:4c:5f:00:2a" ] || {
local nvmac="$(nvram get il0macaddr 2>/dev/null)"
[ -n "$nvmac" ] && [ "$nvmac != "$cfmac ] && {
uci set wireless.$cfg.macaddr="$nvmac"
commit=1
}
}
}
config_load wireless
config_foreach fixup_wmac wifi-device
[ "$commit" = 1 ] && uci commit wireless
}
start() { :; }
stop() { :; }

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -27,26 +27,26 @@ endef
ifneq ($(KERNEL),2.4)
define Image/Build/wgt634u
dd if=$(KDIR)/loader.elf of=$(BIN_DIR)/openwrt-wgt634u-$(2).bin bs=131072 conv=sync
cat $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx >> $(BIN_DIR)/openwrt-wgt634u-$(2).bin
cat $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx >> $(BIN_DIR)/openwrt-wgt634u-$(2).bin
endef
endif
define Image/Build/CyberTAN
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
endef
define Image/Build/CyberTAN2
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx2 -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx2 -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
endef
define Image/Build/CyberTANHead
$(STAGING_DIR_HOST)/bin/addpattern -5 -p $(3) -v v$(4) -i /dev/null -o $(KDIR)/openwrt-$(2)-header.bin $(if $(6),-s $(6))
endef
define Image/Build/Motorola
$(STAGING_DIR_HOST)/bin/motorola-bin -$(3) $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(4).bin
$(STAGING_DIR_HOST)/bin/motorola-bin -$(3) $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(4).bin
endef
define Image/Build/USR
$(STAGING_DIR_HOST)/bin/trx2usr $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(3).bin
$(STAGING_DIR_HOST)/bin/trx2usr $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx $(BIN_DIR)/openwrt-$(2)-$(3).bin
endef
define trxalign/jffs2-128k
@@ -61,7 +61,7 @@ endef
define Image/Build/trxV2
$(call Image/Build/CyberTANHead,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
$(STAGING_DIR_HOST)/bin/trx -2 -o $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx2 \
$(STAGING_DIR_HOST)/bin/trx -2 -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx2 \
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
$(call trxalign/$(1),$(1),$(KDIR)/openwrt-$(2)-header.bin)
$(call Image/Build/CyberTAN2,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
@@ -95,11 +95,11 @@ define Image/Build/squashfs
endef
define Image/Build/Initramfs
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-initramfs.trx -f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma
endef
define Image/Build
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/openwrt-$(BOARD)-$(1).trx \
$(STAGING_DIR_HOST)/bin/trx -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx \
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
$(call trxalign/$(1),$(1))
$(call Image/Build/$(1),$(1))

View File

@@ -23,8 +23,8 @@
#define IMAGETAG_CRC_START 0xFFFFFFFF
#define PIRELLI_BOARDS { \
"AGPF_S0", \
"DWV_SO", \
"AGPF-S0", \
"DWV-S0", \
}
/*

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -103,7 +103,7 @@ define Image/Prepare
endef
define Image/Build
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
# Various routers
$(call Image/Build/CFE,$(1),96345GW2,6345,96345GW2-generic)
$(call Image/Build/CFE,$(1),96345GW2,6345,96348GW2-bc221,,-y 5)

View File

@@ -0,0 +1,13 @@
--- linux-2.6.32.10.orig/drivers/net/bcm63xx_enet.c 2010-04-06 19:25:52.612158288 +0100
+++ linux-2.6.32.10/drivers/net/bcm63xx_enet.c 2010-04-07 21:40:26.991801424 +0100
@@ -965,7 +965,9 @@
/* all set, enable mac and interrupts, start dma engine and
* kick rx dma channel */
wmb();
- enet_writel(priv, ENET_CTL_ENABLE_MASK, ENET_CTL_REG);
+ val = enet_readl(priv, ENET_CTL_REG);
+ val |= ENET_CTL_ENABLE_MASK;
+ enet_writel(priv, val, ENET_CTL_REG);
enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
enet_dma_writel(priv, ENETDMA_CHANCFG_EN_MASK,
ENETDMA_CHANCFG_REG(priv->rx_chan));

View File

@@ -0,0 +1,13 @@
--- linux-2.6.32.10.orig/drivers/net/bcm63xx_enet.c 2010-04-06 19:25:52.612158288 +0100
+++ linux-2.6.32.10/drivers/net/bcm63xx_enet.c 2010-04-07 21:40:26.991801424 +0100
@@ -965,7 +965,9 @@
/* all set, enable mac and interrupts, start dma engine and
* kick rx dma channel */
wmb();
- enet_writel(priv, ENET_CTL_ENABLE_MASK, ENET_CTL_REG);
+ val = enet_readl(priv, ENET_CTL_REG);
+ val |= ENET_CTL_ENABLE_MASK;
+ enet_writel(priv, val, ENET_CTL_REG);
enet_dma_writel(priv, ENETDMA_CFG_EN_MASK, ENETDMA_CFG_REG);
enet_dma_writel(priv, ENETDMA_CHANCFG_EN_MASK,
ENETDMA_CHANCFG_REG(priv->rx_chan));

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2009 OpenWrt.org
# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(BOARD)-vmlinux.elf
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-vmlinux.elf
endef
define Image/Build/squashfs
@@ -17,7 +17,7 @@ endef
define Image/Build
$(call Image/Build/$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
endef
$(eval $(call BuildImage))

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2009 OpenWrt.org
# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -17,7 +17,7 @@ define Image/BuildKernel
-R .note.gnu.build-id -S $(LINUX_DIR)/vmlinux $(KDIR)/vmlinux.bin
mkimage -A m68k -O linux -T kernel -a 0x00020000 -e 0x00020000 \
-C none -n 'M68K OpenWrt Linux-$(LINUX_VERSION)' \
-d $(KDIR)/vmlinux.bin $(BIN_DIR)/openwrt-$(BOARD)-uImage
-d $(KDIR)/vmlinux.bin $(BIN_DIR)/$(IMG_PREFIX)-uImage
endef
define Image/Build

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2009 OpenWrt.org
# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -15,16 +15,16 @@ define Image/BuildKernel
endef
define Image/Build/jffs2-64k
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=64k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=64k conv=sync
endef
define Image/Build/jffs2-128k
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
endef
define Image/Build

View File

@@ -1,15 +1,14 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
define Image/BuildKernel
cp $(KDIR)/vmlinuz $(BIN_DIR)/openwrt-$(BOARD)-zImage
cp $(KDIR)/vmlinuz $(BIN_DIR)/$(IMG_PREFIX)-zImage
endef
define Image/Prepare
@@ -23,7 +22,7 @@ define Image/Build/generic
mkfimage $(KDIR)/vmlinuz $(KDIR)/vmlinuz.tmp
cat $(KDIR)/vmlinuz.tmp $(KDIR)/root.$(1) > $(KDIR)/fimage.$(1).tmp
dd if=$(KDIR)/fimage.$(1).tmp of=$(KDIR)/fimage.$(1) bs=$(2) conv=sync
cp $(KDIR)/fimage.$(1) $(BIN_DIR)/openwrt-$(BOARD)-$(1)-fimage
cp $(KDIR)/fimage.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(1)-fimage
endef
define Image/Build/jffs2-64k

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2009 OpenWrt.org
# Copyright (C) 2009-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -9,27 +9,27 @@ include $(INCLUDE_DIR)/image.mk
define Image/Prepare
# WBD111: mach id 1690 (0x69a)
echo -en "\x06\x1c\xa0\xe3\x9a\x10\x81\xe3" > $(KDIR)/openwrt-$(BOARD)-wbd111-zImage
cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/openwrt-$(BOARD)-wbd111-zImage
echo -en "\x06\x1c\xa0\xe3\x9a\x10\x81\xe3" > $(KDIR)/$(IMG_PREFIX)-wbd111-zImage
cat $(LINUX_DIR)/arch/arm/boot/zImage >> $(KDIR)/$(IMG_PREFIX)-wbd111-zImage
endef
define Image/BuildKernel
# workaround the bootloader's bug with extra nops
echo -en "\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1" > $(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage
cat $(KDIR)/openwrt-$(BOARD)-wbd111-zImage >> $(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage
echo -en "\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1\x00\x00\xa0\xe1" > $(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage
cat $(KDIR)/$(IMG_PREFIX)-wbd111-zImage >> $(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage
endef
define Image/Build/jffs2-64k
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=64k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=64k conv=sync
endef
define Image/Build/jffs2-128k
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
endef
define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-$(1).img bs=128k conv=sync
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1).img bs=128k conv=sync
endef
define Image/Build
@@ -38,9 +38,9 @@ define Image/Build
-$(STAGING_DIR_HOST)/bin/mkfwimage2 \
-m GEOS -f 0x30000000 -z \
-v WILI-S.WILIBOARD.v5.00.SL3512.OpenWrt.00000.000000.000000 \
-o $(BIN_DIR)/openwrt-$(BOARD)-wbd111-$(1).bin \
-p Kernel:0x020000:0x100000:0:0:$(BIN_DIR)/openwrt-$(BOARD)-wbd111-zImage \
-p Ramdisk:0x120000:0x500000:0:0:$(BIN_DIR)/openwrt-$(BOARD)-$(1).img
-o $(BIN_DIR)/$(IMG_PREFIX)-wbd111-$(1).bin \
-p Kernel:0x020000:0x100000:0:0:$(BIN_DIR)/$(IMG_PREFIX)-wbd111-zImage \
-p Ramdisk:0x120000:0x500000:0:0:$(BIN_DIR)/$(IMG_PREFIX)-$(1).img
endef
$(eval $(call BuildImage))

View File

@@ -0,0 +1,95 @@
--- /dev/null
+++ b/include/linux/netfilter_ipv4/ipt_comment.h
@@ -0,0 +1,10 @@
+#ifndef _IPT_COMMENT_H
+#define _IPT_COMMENT_H
+
+#define IPT_MAX_COMMENT_LEN 256
+
+struct ipt_comment_info {
+ char comment[IPT_MAX_COMMENT_LEN];
+};
+
+#endif /* _IPT_COMMENT_H */
--- /dev/null
+++ b/net/ipv4/netfilter/ipt_comment.c
@@ -0,0 +1,59 @@
+/*
+ * Implements a dummy match to allow attaching comments to rules
+ *
+ * 2003-05-13 Brad Fisher (brad@info-link.net)
+ */
+
+#include <linux/module.h>
+#include <linux/skbuff.h>
+#include <linux/netfilter_ipv4/ip_tables.h>
+#include <linux/netfilter_ipv4/ipt_comment.h>
+
+MODULE_AUTHOR("Brad Fisher <brad@info-link.net>");
+MODULE_DESCRIPTION("iptables comment match module");
+MODULE_LICENSE("GPL");
+
+static int
+match(const struct sk_buff *skb,
+ const struct net_device *in,
+ const struct net_device *out,
+ const void *matchinfo,
+ int offset,
+ int *hotdrop)
+{
+ /* We always match */
+ return 1;
+}
+
+static int
+checkentry(const char *tablename,
+ const struct ipt_ip *ip,
+ void *matchinfo,
+ unsigned int matchsize,
+ unsigned int hook_mask)
+{
+ /* Check the size */
+ if (matchsize != IPT_ALIGN(sizeof(struct ipt_comment_info)))
+ return 0;
+ return 1;
+}
+
+static struct ipt_match comment_match = {
+ .name = "comment",
+ .match = match,
+ .checkentry = checkentry,
+ .me = THIS_MODULE
+};
+
+static int __init init(void)
+{
+ return ipt_register_match(&comment_match);
+}
+
+static void __exit fini(void)
+{
+ ipt_unregister_match(&comment_match);
+}
+
+module_init(init);
+module_exit(fini);
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -113,6 +113,7 @@ obj-$(CONFIG_IP_NF_MATCH_UNCLEAN) += ipt
obj-$(CONFIG_IP_NF_MATCH_STRING) += ipt_string.o
obj-$(CONFIG_IP_NF_MATCH_TCPMSS) += ipt_tcpmss.o
obj-$(CONFIG_IP_NF_MATCH_LAYER7) += ipt_layer7.o
+obj-$(CONFIG_IP_NF_MATCH_COMMENT) += ipt_comment.o
# targets
obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
--- a/net/ipv4/netfilter/Config.in
+++ b/net/ipv4/netfilter/Config.in
@@ -44,6 +44,7 @@ if [ "$CONFIG_IP_NF_IPTABLES" != "n" ];
dep_tristate ' LENGTH match support' CONFIG_IP_NF_MATCH_LENGTH $CONFIG_IP_NF_IPTABLES
dep_tristate ' TTL match support' CONFIG_IP_NF_MATCH_TTL $CONFIG_IP_NF_IPTABLES
dep_tristate ' tcpmss match support' CONFIG_IP_NF_MATCH_TCPMSS $CONFIG_IP_NF_IPTABLES
+ dep_tristate ' comment match support' CONFIG_IP_NF_MATCH_COMMENT $CONFIG_IP_NF_IPTABLES
if [ "$CONFIG_IP_NF_CONNTRACK" != "n" ]; then
dep_tristate ' Helper match support' CONFIG_IP_NF_MATCH_HELPER $CONFIG_IP_NF_IPTABLES
fi

View File

@@ -1107,7 +1107,8 @@ CONFIG_JFFS2_FS=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
CONFIG_JFFS2_SUMMARY=y
CONFIG_JFFS2_ZLIB=y
#CONFIG_JFFS2_ZLIB is not set
CONFIG_JFFS2_LZMA=y
# CONFIG_JFFS_FS is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_FS is not set

View File

@@ -669,6 +669,7 @@ CONFIG_GENERIC_TIME=y
# CONFIG_GPIO_DEVICE is not set
# CONFIG_GPIO_LANGWELL is not set
# CONFIG_GPIOLIB is not set
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX7301 is not set
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_MC33880 is not set
@@ -782,6 +783,7 @@ CONFIG_HZ_100=y
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DESIGNWARE is not set
# CONFIG_I2C_ELEKTOR is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_HELPER_AUTO is not set
@@ -803,12 +805,14 @@ CONFIG_HZ_100=y
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_SMBUS is not set
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
# CONFIG_I2C_XILINX is not set
# CONFIG_I2O is not set
# CONFIG_I82092 is not set
# CONFIG_I82365 is not set
@@ -1106,7 +1110,8 @@ CONFIG_JFFS2_FS=y
CONFIG_JFFS2_RTIME=y
# CONFIG_JFFS2_RUBIN is not set
CONFIG_JFFS2_SUMMARY=y
CONFIG_JFFS2_ZLIB=y
#CONFIG_JFFS2_ZLIB is not set
CONFIG_JFFS2_LZMA=y
# CONFIG_JFFS_FS is not set
# CONFIG_JFS_DEBUG is not set
# CONFIG_JFS_FS is not set
@@ -1198,6 +1203,7 @@ CONFIG_MAC80211_DEFAULT_PS=y
# CONFIG_MACINTOSH_DRIVERS is not set
# CONFIG_MAC_PARTITION is not set
# CONFIG_MACVLAN is not set
# CONFIG_MACVTAP is not set
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_MARKEINS is not set
# CONFIG_MARKERS is not set
@@ -1226,6 +1232,7 @@ CONFIG_MAC80211_DEFAULT_PS=y
# CONFIG_MFD_WM831X is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM8994 is not set
# CONFIG_MG_DISK is not set
# CONFIG_MIGRATION is not set
CONFIG_MII=y
@@ -2024,6 +2031,7 @@ CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7473 is not set
@@ -2031,6 +2039,7 @@ CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_APPLESMC is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_ATK0110 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_CORETEMP is not set
@@ -2765,6 +2774,7 @@ CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
# CONFIG_VIDEO_TVAUDIO is not set
# CONFIG_VIDEO_TVP514X is not set
# CONFIG_VIDEO_TVP5150 is not set
# CONFIG_VIDEO_TVP7002 is not set
# CONFIG_VIDEO_UPD64031A is not set
# CONFIG_VIDEO_UPD64083 is not set
# CONFIG_VIDEO_USBVISION is not set

View File

@@ -31,6 +31,9 @@
#include <linux/etherdevice.h>
#include "ar8216.h"
/* size of the vlan table */
#define AR8X16_MAX_VLANS 128
#define AR8X16_PROBE_RETRIES 10
struct ar8216_priv {
struct switch_dev dev;
@@ -39,11 +42,13 @@ struct ar8216_priv {
void (*write)(struct ar8216_priv *priv, int reg, u32 val);
const struct net_device_ops *ndo_old;
struct net_device_ops ndo;
struct mutex reg_mutex;
int chip;
/* all fields below are cleared on reset */
bool vlan;
u16 vlan_id[AR8216_NUM_VLANS];
u8 vlan_table[AR8216_NUM_VLANS];
u16 vlan_id[AR8X16_MAX_VLANS];
u8 vlan_table[AR8X16_MAX_VLANS];
u8 vlan_tagged;
u16 pvid[AR8216_NUM_PORTS];
};
@@ -110,6 +115,47 @@ ar8216_rmw(struct ar8216_priv *priv, int reg, u32 mask, u32 val)
return v;
}
static inline int
ar8216_id_chip(struct ar8216_priv *priv)
{
u32 val;
u16 id;
int i;
val = ar8216_mii_read(priv, AR8216_REG_CTRL);
if (val == ~0)
return UNKNOWN;
id = val & (AR8216_CTRL_REVISION | AR8216_CTRL_VERSION);
for (i = 0; i < AR8X16_PROBE_RETRIES; i++) {
u16 t;
val = ar8216_mii_read(priv, AR8216_REG_CTRL);
if (val == ~0)
return UNKNOWN;
t = val & (AR8216_CTRL_REVISION | AR8216_CTRL_VERSION);
if (t != id)
return UNKNOWN;
}
switch (id) {
case 0x0101:
return AR8216;
case 0x1001:
return AR8316;
default:
printk(KERN_DEBUG
"ar8216: Unknown Atheros device [ver=%d, rev=%d, phy_id=%04x%04x]\n",
(int)(id >> AR8216_CTRL_VERSION_S),
(int)(id & AR8216_CTRL_REVISION),
priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 2),
priv->phy->bus->read(priv->phy->bus, priv->phy->addr, 3));
return UNKNOWN;
}
}
static int
ar8216_set_vlan(struct switch_dev *dev, const struct switch_attr *attr,
struct switch_val *val)
@@ -136,7 +182,7 @@ ar8216_set_pvid(struct switch_dev *dev, int port, int vlan)
/* make sure no invalid PVIDs get set */
if (vlan >= AR8216_NUM_VLANS)
if (vlan >= dev->vlans)
return -EINVAL;
priv->pvid[port] = vlan;
@@ -251,7 +297,7 @@ recv:
error:
/* no vlan? eat the packet! */
dev_kfree_skb_any(skb);
return 0;
return NET_RX_DROP;
}
static int
@@ -336,7 +382,7 @@ ar8216_set_ports(struct switch_dev *dev, struct switch_val *val)
/* make sure that an untagged port does not
* appear in other vlans */
for (j = 0; j < AR8216_NUM_VLANS; j++) {
for (j = 0; j < AR8X16_MAX_VLANS; j++) {
if (j == val->port_vlan)
continue;
priv->vlan_table[j] &= ~(1 << p->id);
@@ -383,6 +429,7 @@ ar8216_hw_apply(struct switch_dev *dev)
u8 portmask[AR8216_NUM_PORTS];
int i, j;
mutex_lock(&priv->reg_mutex);
/* flush all vlan translation unit entries */
ar8216_vtu_op(priv, AR8216_VTU_OP_FLUSH, 0);
@@ -390,7 +437,7 @@ ar8216_hw_apply(struct switch_dev *dev)
if (priv->vlan) {
/* calculate the port destination masks and load vlans
* into the vlan translation unit */
for (j = 0; j < AR8216_NUM_VLANS; j++) {
for (j = 0; j < AR8X16_MAX_VLANS; j++) {
u8 vp = priv->vlan_table[j];
if (!vp)
@@ -446,7 +493,7 @@ ar8216_hw_apply(struct switch_dev *dev)
AR8216_PORT_CTRL_SINGLE_VLAN | AR8216_PORT_CTRL_STATE |
AR8216_PORT_CTRL_HEADER | AR8216_PORT_CTRL_LEARN_LOCK,
AR8216_PORT_CTRL_LEARN |
(priv->vlan && i == AR8216_PORT_CPU ?
(priv->vlan && i == AR8216_PORT_CPU && (priv->chip == AR8216) ?
AR8216_PORT_CTRL_HEADER : 0) |
(egress << AR8216_PORT_CTRL_VLAN_MODE_S) |
(AR8216_PORT_STATE_FORWARD << AR8216_PORT_CTRL_STATE_S));
@@ -458,7 +505,73 @@ ar8216_hw_apply(struct switch_dev *dev)
(ingress << AR8216_PORT_VLAN_MODE_S) |
(pvid << AR8216_PORT_VLAN_DEFAULT_ID_S));
}
mutex_unlock(&priv->reg_mutex);
return 0;
}
static int
ar8316_hw_init(struct ar8216_priv *priv) {
static int initialized;
int i;
u32 val;
struct mii_bus *bus;
if (initialized)
return 0;
val = priv->read(priv, 0x8);
if (priv->phy->interface == PHY_INTERFACE_MODE_RGMII) {
/* value taken from Ubiquiti RouterStation Pro */
if (val == 0x81461bea) {
/* switch already intialized by bootloader */
initialized = true;
return 0;
}
priv->write(priv, 0x8, 0x81461bea);
} else if (priv->phy->interface == PHY_INTERFACE_MODE_GMII) {
/* value taken from AVM Fritz!Box 7390 sources */
if (val == 0x010e5b71) {
/* switch already initialized by bootloader */
initialized = true;
return 0;
}
priv->write(priv, 0x8, 0x010e5b71);
} else {
/* no known value for phy interface */
printk(KERN_ERR "ar8316: unsupported mii mode: %d.\n",
priv->phy->interface);
return -EINVAL;
}
/* standard atheros magic */
priv->write(priv, 0x38, 0xc000050e);
/* Initialize the ports */
bus = priv->phy->bus;
for (i = 0; i < 5; i++) {
if ((i == 4) &&
priv->phy->interface == PHY_INTERFACE_MODE_RGMII) {
/* work around for phy4 rgmii mode */
bus->write(bus, i, MII_ATH_DBG_ADDR, 0x12);
bus->write(bus, i, MII_ATH_DBG_DATA, 0x480c);
/* rx delay */
bus->write(bus, i, MII_ATH_DBG_ADDR, 0x0);
bus->write(bus, i, MII_ATH_DBG_DATA, 0x824e);
/* tx delay */
bus->write(bus, i, MII_ATH_DBG_ADDR, 0x5);
bus->write(bus, i, MII_ATH_DBG_DATA, 0x3d47);
msleep(1000);
}
/* initialize the port itself */
bus->write(bus, i, MII_ADVERTISE,
ADVERTISE_ALL | ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM);
bus->write(bus, i, MII_CTRL1000, ADVERTISE_1000FULL);
bus->write(bus, i, MII_BMCR, BMCR_RESET | BMCR_ANENABLE);
msleep(1000);
}
initialized = true;
return 0;
}
@@ -468,9 +581,10 @@ ar8216_reset_switch(struct switch_dev *dev)
struct ar8216_priv *priv = to_ar8216(dev);
int i;
mutex_lock(&priv->reg_mutex);
memset(&priv->vlan, 0, sizeof(struct ar8216_priv) -
offsetof(struct ar8216_priv, vlan));
for (i = 0; i < AR8216_NUM_VLANS; i++) {
for (i = 0; i < AR8X16_MAX_VLANS; i++) {
priv->vlan_id[i] = i;
}
for (i = 0; i < AR8216_NUM_PORTS; i++) {
@@ -485,9 +599,12 @@ ar8216_reset_switch(struct switch_dev *dev)
if (i == AR8216_PORT_CPU) {
priv->write(priv, AR8216_REG_PORT_STATUS(i),
AR8216_PORT_STATUS_LINK_UP |
AR8216_PORT_SPEED_100M |
((priv->chip == AR8316) ?
AR8216_PORT_SPEED_1000M : AR8216_PORT_SPEED_100M) |
AR8216_PORT_STATUS_TXMAC |
AR8216_PORT_STATUS_RXMAC |
((priv->chip == AR8316) ? AR8216_PORT_STATUS_RXFLOW : 0) |
((priv->chip == AR8316) ? AR8216_PORT_STATUS_TXFLOW : 0) |
AR8216_PORT_STATUS_DUPLEX);
} else {
priv->write(priv, AR8216_REG_PORT_STATUS(i),
@@ -497,9 +614,20 @@ ar8216_reset_switch(struct switch_dev *dev)
/* XXX: undocumented magic from atheros, required! */
priv->write(priv, 0x38, 0xc000050e);
ar8216_rmw(priv, AR8216_REG_GLOBAL_CTRL,
AR8216_GCTRL_MTU, 1518 + 8 + 2);
if (priv->chip == AR8216) {
ar8216_rmw(priv, AR8216_REG_GLOBAL_CTRL,
AR8216_GCTRL_MTU, 1518 + 8 + 2);
} else if (priv->chip == AR8316) {
/* enable jumbo frames */
ar8216_rmw(priv, AR8216_REG_GLOBAL_CTRL,
AR8316_GCTRL_MTU, 9018 + 8 + 2);
}
if (priv->chip == AR8316) {
/* enable cpu port to receive multicast and broadcast frames */
priv->write(priv, AR8216_REG_FLOOD_MASK, 0x003f003f);
}
mutex_unlock(&priv->reg_mutex);
return ar8216_hw_apply(dev);
}
@@ -510,37 +638,76 @@ ar8216_config_init(struct phy_device *pdev)
struct net_device *dev = pdev->attached_dev;
int ret;
printk("%s: AR8216 PHY driver attached.\n", pdev->attached_dev->name);
pdev->supported = ADVERTISED_100baseT_Full;
pdev->advertising = ADVERTISED_100baseT_Full;
priv = kzalloc(sizeof(struct ar8216_priv), GFP_KERNEL);
if (priv == NULL)
return -ENOMEM;
priv->phy = pdev;
priv->chip = ar8216_id_chip(priv);
if (pdev->addr == 0)
printk(KERN_INFO "%s: AR%d switch driver attached.\n",
pdev->attached_dev->name, priv->chip);
if (pdev->addr != 0) {
if (priv->chip == AR8316) {
pdev->supported |= SUPPORTED_1000baseT_Full;
pdev->advertising |= ADVERTISED_1000baseT_Full;
}
kfree(priv);
return 0;
}
pdev->supported = priv->chip == AR8316 ?
SUPPORTED_1000baseT_Full : SUPPORTED_100baseT_Full;
pdev->advertising = pdev->supported;
mutex_init(&priv->reg_mutex);
priv->read = ar8216_mii_read;
priv->write = ar8216_mii_write;
memcpy(&priv->dev, &athdev, sizeof(struct switch_dev));
pdev->priv = priv;
if (priv->chip == AR8316) {
priv->dev.name = "Atheros AR8316";
priv->dev.vlans = AR8X16_MAX_VLANS;
/* port 5 connected to the other mac, therefore unusable */
priv->dev.ports = (AR8216_NUM_PORTS - 1);
}
if ((ret = register_switch(&priv->dev, pdev->attached_dev)) < 0) {
kfree(priv);
goto done;
}
if (priv->chip == AR8316) {
ret = ar8316_hw_init(priv);
if (ret) {
kfree(priv);
goto done;
}
}
ret = ar8216_reset_switch(&priv->dev);
if (ret)
if (ret) {
kfree(priv);
goto done;
}
dev->phy_ptr = priv;
pdev->pkt_align = 2;
pdev->netif_receive_skb = ar8216_netif_receive_skb;
pdev->netif_rx = ar8216_netif_rx;
priv->ndo_old = dev->netdev_ops;
memcpy(&priv->ndo, priv->ndo_old, sizeof(struct net_device_ops));
priv->ndo.ndo_start_xmit = ar8216_mangle_tx;
dev->netdev_ops = &priv->ndo;
/* VID fixup only needed on ar8216 */
if (pdev->addr == 0 && priv->chip == AR8216) {
pdev->pkt_align = 2;
pdev->netif_receive_skb = ar8216_netif_receive_skb;
pdev->netif_rx = ar8216_netif_rx;
priv->ndo_old = dev->netdev_ops;
memcpy(&priv->ndo, priv->ndo_old, sizeof(struct net_device_ops));
priv->ndo.ndo_start_xmit = ar8216_mangle_tx;
dev->netdev_ops = &priv->ndo;
}
done:
return ret;
@@ -550,43 +717,50 @@ static int
ar8216_read_status(struct phy_device *phydev)
{
struct ar8216_priv *priv = phydev->priv;
int ret;
if (phydev->addr != 0) {
return genphy_read_status(phydev);
}
phydev->speed = SPEED_100;
phydev->speed = priv->chip == AR8316 ? SPEED_1000 : SPEED_100;
phydev->duplex = DUPLEX_FULL;
phydev->link = 1;
/* flush the address translation unit */
if (ar8216_wait_bit(priv, AR8216_REG_ATU, AR8216_ATU_ACTIVE, 0))
return -ETIMEDOUT;
mutex_lock(&priv->reg_mutex);
ret = ar8216_wait_bit(priv, AR8216_REG_ATU, AR8216_ATU_ACTIVE, 0);
priv->write(priv, AR8216_REG_ATU, AR8216_ATU_OP_FLUSH);
if (!ret)
priv->write(priv, AR8216_REG_ATU, AR8216_ATU_OP_FLUSH);
else
ret = -ETIMEDOUT;
mutex_unlock(&priv->reg_mutex);
phydev->state = PHY_RUNNING;
netif_carrier_on(phydev->attached_dev);
phydev->adjust_link(phydev->attached_dev);
return 0;
return ret;
}
static int
ar8216_config_aneg(struct phy_device *phydev)
{
return 0;
if (phydev->addr == 0)
return 0;
return genphy_config_aneg(phydev);
}
static int
ar8216_probe(struct phy_device *pdev)
{
struct ar8216_priv priv;
u8 id, rev;
u32 val;
u16 chip;
priv.phy = pdev;
val = ar8216_mii_read(&priv, AR8216_REG_CTRL);
rev = val & AR8216_CTRL_REVISION;
id = (val & AR8216_CTRL_VERSION) >> AR8216_CTRL_VERSION_S;
if ((id != 1) || (rev != 1))
chip = ar8216_id_chip(&priv);
if (chip == UNKNOWN)
return -ENODEV;
return 0;
@@ -603,7 +777,8 @@ ar8216_remove(struct phy_device *pdev)
if (priv->ndo_old && dev)
dev->netdev_ops = priv->ndo_old;
unregister_switch(&priv->dev);
if (pdev->addr == 0)
unregister_switch(&priv->dev);
kfree(priv);
}
@@ -634,7 +809,9 @@ static struct switch_dev athdev = {
};
static struct phy_driver ar8216_driver = {
.name = "Atheros AR8216",
.phy_id = 0x004d0000,
.name = "Atheros AR8216/AR8316",
.phy_id_mask = 0xffff0000,
.features = PHY_BASIC_FEATURES,
.probe = ar8216_probe,
.remove = ar8216_remove,

View File

@@ -22,6 +22,11 @@
#define AR8216_PORT_CPU 0
#define AR8216_NUM_PORTS 6
#define AR8216_NUM_VLANS 16
#define AR8316_NUM_VLANS 4096
/* Atheros specific MII registers */
#define MII_ATH_DBG_ADDR 0x1d
#define MII_ATH_DBG_DATA 0x1e
#define AR8216_REG_CTRL 0x0000
#define AR8216_CTRL_REVISION BITS(0, 8)
@@ -30,8 +35,13 @@
#define AR8216_CTRL_VERSION_S 8
#define AR8216_CTRL_RESET BIT(31)
#define AR8216_REG_FLOOD_MASK 0x002C
#define AR8216_FM_UNI_DEST_PORTS BITS(0, 6)
#define AR8216_FM_MULTI_DEST_PORTS BITS(16, 6)
#define AR8216_REG_GLOBAL_CTRL 0x0030
#define AR8216_GCTRL_MTU BITS(0, 11)
#define AR8316_GCTRL_MTU BITS(0, 14)
#define AR8216_REG_VTU 0x0040
#define AR8216_VTU_OP BITS(0, 3)
@@ -75,6 +85,11 @@
#define AR8216_ATU_ADDR1 BITS(16, 8)
#define AR8216_ATU_ADDR0 BITS(24, 8)
#define AR8216_REG_ATU_CTRL 0x005C
#define AR8216_ATU_CTRL_AGE_EN BIT(17)
#define AR8216_ATU_CTRL_AGE_TIME BITS(0, 16)
#define AR8216_ATU_CTRL_AGE_TIME_S 0
#define AR8216_PORT_OFFSET(_i) (0x0100 * (_i + 1))
#define AR8216_REG_PORT_STATUS(_i) (AR8216_PORT_OFFSET(_i) + 0x0000)
#define AR8216_PORT_STATUS_SPEED BITS(0,2)
@@ -162,4 +177,11 @@ enum {
AR8216_PORT_STATE_FORWARD = 4
};
/* device */
enum {
UNKNOWN = 0,
AR8216 = 8216,
AR8316 = 8316
};
#endif

View File

@@ -463,6 +463,8 @@ swconfig_lookup_attr(struct switch_dev *dev, struct genl_info *info,
if (!info->attrs[SWITCH_ATTR_OP_VLAN])
goto done;
val->port_vlan = nla_get_u32(info->attrs[SWITCH_ATTR_OP_VLAN]);
if (val->port_vlan >= dev->vlans)
goto done;
break;
case SWITCH_CMD_SET_PORT:
case SWITCH_CMD_GET_PORT:
@@ -473,6 +475,8 @@ swconfig_lookup_attr(struct switch_dev *dev, struct genl_info *info,
if (!info->attrs[SWITCH_ATTR_OP_PORT])
goto done;
val->port_vlan = nla_get_u32(info->attrs[SWITCH_ATTR_OP_PORT]);
if (val->port_vlan >= dev->ports)
goto done;
break;
default:
WARN_ON(1);

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.

View File

@@ -0,0 +1,11 @@
--- a/arch/mips/kernel/machine_kexec.c 2010-03-15 15:52:04.000000000 +0000
+++ b/arch/mips/kernel/machine_kexec.c 2010-03-29 12:10:37.000000000 +0100
@@ -52,7 +52,7 @@
reboot_code_buffer =
(unsigned long)page_address(image->control_code_page);
- kexec_start_address = image->start;
+ kexec_start_address = (unsigned long) phys_to_virt(image->start);
kexec_indirection_page =
(unsigned long) phys_to_virt(image->head & PAGE_MASK);

View File

@@ -0,0 +1,11 @@
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -52,7 +52,7 @@ machine_kexec(struct kimage *image)
reboot_code_buffer =
(unsigned long)page_address(image->control_code_page);
- kexec_start_address = image->start;
+ kexec_start_address = (unsigned long) phys_to_virt(image->start);
kexec_indirection_page =
(unsigned long) phys_to_virt(image->head & PAGE_MASK);

View File

@@ -349,18 +349,7 @@ create mode 100644 arch/mips/kernel/crash_dump.c
typedef void (*noretfun_t)(void) __attribute__((noreturn));
void
@@ -52,7 +73,9 @@ machine_kexec(struct kimage *image)
reboot_code_buffer =
(unsigned long)page_address(image->control_code_page);
- kexec_start_address = image->start;
+ kexec_start_address =
+ (unsigned long) phys_to_virt(image->start);
+
kexec_indirection_page =
(unsigned long) phys_to_virt(image->head & PAGE_MASK);
@@ -63,7 +86,7 @@ machine_kexec(struct kimage *image)
@@ -63,7 +84,7 @@ machine_kexec(struct kimage *image)
* The generic kexec code builds a page list with physical
* addresses. they are directly accessible through KSEG0 (or
* CKSEG0 or XPHYS if on 64bit system), hence the
@@ -369,7 +358,7 @@ create mode 100644 arch/mips/kernel/crash_dump.c
*/
for (ptr = &image->head; (entry = *ptr) && !(entry &IND_DONE);
ptr = (entry & IND_INDIRECTION) ?
@@ -78,8 +101,39 @@ machine_kexec(struct kimage *image)
@@ -78,8 +99,39 @@ machine_kexec(struct kimage *image)
*/
local_irq_disable();

View File

@@ -0,0 +1,11 @@
--- a/arch/mips/kernel/machine_kexec.c 2010-03-15 15:52:04.000000000 +0000
+++ b/arch/mips/kernel/machine_kexec.c 2010-03-29 12:10:37.000000000 +0100
@@ -52,7 +52,7 @@
reboot_code_buffer =
(unsigned long)page_address(image->control_code_page);
- kexec_start_address = image->start;
+ kexec_start_address = (unsigned long) phys_to_virt(image->start);
kexec_indirection_page =
(unsigned long) phys_to_virt(image->head & PAGE_MASK);

View File

@@ -0,0 +1,11 @@
--- a/arch/mips/kernel/machine_kexec.c 2010-03-15 15:52:04.000000000 +0000
+++ b/arch/mips/kernel/machine_kexec.c 2010-03-29 12:10:37.000000000 +0100
@@ -52,7 +52,7 @@
reboot_code_buffer =
(unsigned long)page_address(image->control_code_page);
- kexec_start_address = image->start;
+ kexec_start_address = (unsigned long) phys_to_virt(image->start);
kexec_indirection_page =
(unsigned long) phys_to_virt(image->head & PAGE_MASK);

View File

@@ -65,7 +65,7 @@ Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
+#endif
--- a/include/linux/decompress/mm.h
+++ b/include/linux/decompress/mm.h
@@ -53,8 +53,6 @@ static void free(void *where)
@@ -63,8 +63,6 @@ static void free(void *where)
#define set_error_fn(x)
@@ -74,7 +74,7 @@ Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
#else /* STATIC */
/* Code active when compiled standalone for use when loading ramdisk: */
@@ -77,7 +75,6 @@ static void free(void *where)
@@ -87,7 +85,6 @@ static void free(void *where)
static void(*error)(char *m);
#define set_error_fn(x) error = x;

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@
static int cfi_amdstd_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int cfi_amdstd_write_words(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
@@ -375,12 +376,19 @@ struct mtd_info *cfi_cmdset_0002(struct
@@ -375,12 +376,19 @@ struct mtd_info *cfi_cmdset_0002(struct
if (extp->MajorVersion != '1' ||
(extp->MinorVersion < '0' || extp->MinorVersion > '4')) {

View File

@@ -157,7 +157,7 @@
unsigned int vced_count, vcei_count;
@@ -31,8 +32,12 @@ static int show_cpuinfo(struct seq_file
@@ -31,8 +32,12 @@ static int show_cpuinfo(struct seq_file
/*
* For the first processor also print the system type
*/

View File

@@ -0,0 +1,11 @@
--- a/arch/mips/kernel/machine_kexec.c
+++ b/arch/mips/kernel/machine_kexec.c
@@ -52,7 +52,7 @@ machine_kexec(struct kimage *image)
reboot_code_buffer =
(unsigned long)page_address(image->control_code_page);
- kexec_start_address = image->start;
+ kexec_start_address = (unsigned long) phys_to_virt(image->start);
kexec_indirection_page =
(unsigned long) phys_to_virt(image->head & PAGE_MASK);

View File

@@ -33,8 +33,8 @@
/* Enable 1k I/O space granularity on the Intel P64H2 */
static void __devinit quirk_p64h2_1k_io(struct pci_dev *dev)
{
@@ -2536,6 +2539,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150d, quirk_i82576_sriov);
@@ -2537,6 +2540,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1518, quirk_i82576_sriov);
#endif /* CONFIG_PCI_IOV */
+#endif /* !CONFIG_PCI_DISABLE_COMMON_QUIRKS */

View File

@@ -110,7 +110,7 @@
{
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -625,6 +625,7 @@ try_scan:
@@ -637,6 +637,7 @@ try_scan:
kfree(state);
return 0;
}

View File

@@ -71,7 +71,7 @@
depends on NETFILTER_ADVANCED
--- a/net/netfilter/Makefile
+++ b/net/netfilter/Makefile
@@ -89,6 +89,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT)
@@ -89,6 +89,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_RECENT)
obj-$(CONFIG_NETFILTER_XT_MATCH_SCTP) += xt_sctp.o
obj-$(CONFIG_NETFILTER_XT_MATCH_SOCKET) += xt_socket.o
obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state.o

View File

@@ -127,10 +127,11 @@
e = (struct ipt_entry *)(loc_cpu_entry + off);
if (copy_to_user(userptr + off
@@ -1002,6 +1042,14 @@ copy_entries_to_user(unsigned int total_
@@ -1001,6 +1041,14 @@ copy_entries_to_user(unsigned int total_
ret = -EFAULT;
goto free_counters;
}
+
+ flags = e->ip.flags & ~IPT_F_NO_DEF_MATCH;
+ if (copy_to_user(userptr + off
+ + offsetof(struct ipt_entry, ip.flags),
@@ -138,7 +139,6 @@
+ ret = -EFAULT;
+ goto free_counters;
+ }
+
for (i = sizeof(struct ipt_entry);
i < e->target_offset;
i += m->u.match_size) {

View File

@@ -851,17 +851,18 @@
/* Don't change this without changing skb_csum_unnecessary! */
#define CHECKSUM_NONE 0
@@ -327,6 +330,9 @@
* first. This is owned by whoever has the skb queued ATM.
*/
@@ -323,6 +326,10 @@ struct sk_buff {
char cb[48] __aligned(8);
+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
+ void *cb_next;
+#endif
unsigned long _skb_dst;
+#if defined(CONFIG_IMQ) || defined(CONFIG_IMQ_MODULE)
+ void *cb_next;
+#endif
+
#ifdef CONFIG_XFRM
@@ -363,6 +369,9 @@
struct sec_path *sp;
#endif
@@ -357,6 +364,9 @@ struct sk_buff {
struct nf_conntrack *nfct;
struct sk_buff *nfct_reasm;
#endif
@@ -871,7 +872,7 @@
#ifdef CONFIG_BRIDGE_NETFILTER
struct nf_bridge_info *nf_bridge;
#endif
@@ -384,6 +393,10 @@
@@ -378,6 +388,10 @@ struct sk_buff {
/* 0/14 bit hole */
@@ -882,7 +883,7 @@
#ifdef CONFIG_NET_DMA
dma_cookie_t dma_cookie;
#endif
@@ -432,6 +445,12 @@
@@ -426,6 +440,12 @@ static inline struct rtable *skb_rtable(
return (struct rtable *)skb_dst(skb);
}
@@ -895,7 +896,7 @@
extern void kfree_skb(struct sk_buff *skb);
extern void consume_skb(struct sk_buff *skb);
extern void __kfree_skb(struct sk_buff *skb);
@@ -1976,6 +1995,10 @@
@@ -1970,6 +1990,10 @@ static inline void __nf_copy(struct sk_b
dst->nfct_reasm = src->nfct_reasm;
nf_conntrack_get_reasm(src->nfct_reasm);
#endif
@@ -1183,7 +1184,7 @@
/* return EBUSY when somebody else is registered, return EEXIST if the
* same handler is registered, return 0 in case of success. */
int nf_register_queue_handler(u_int8_t pf, const struct nf_queue_handler *qh)
@@ -80,7 +100,7 @@ void nf_unregister_queue_handlers(const
@@ -80,7 +100,7 @@ void nf_unregister_queue_handlers(const
}
EXPORT_SYMBOL_GPL(nf_unregister_queue_handlers);

View File

@@ -1,6 +1,6 @@
--- a/arch/mips/include/asm/string.h
+++ b/arch/mips/include/asm/string.h
@@ -133,11 +133,44 @@ strncmp(__const__ char *__cs, __const__
@@ -133,11 +133,44 @@ strncmp(__const__ char *__cs, __const__
#define __HAVE_ARCH_MEMSET
extern void *memset(void *__s, int __c, size_t __count);

View File

@@ -1,6 +1,6 @@
--- a/include/linux/slab.h
+++ b/include/linux/slab.h
@@ -124,8 +124,8 @@ int kmem_ptr_validate(struct kmem_cache
@@ -124,8 +124,8 @@ int kmem_ptr_validate(struct kmem_cache
* to do various tricks to work around compiler limitations in order to
* ensure proper constant folding.
*/

View File

@@ -1,6 +1,6 @@
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1377,11 +1377,18 @@ static inline int skb_network_offset(con
@@ -1373,11 +1373,18 @@ static inline int skb_network_offset(con
*
* Various parts of the networking layer expect at least 32 bytes of
* headroom, you should not reduce this.
@@ -19,7 +19,7 @@
extern int ___pskb_trim(struct sk_buff *skb, unsigned int len);
static inline void __skb_trim(struct sk_buff *skb, unsigned int len)
@@ -1471,9 +1478,9 @@ static inline void __skb_queue_purge(str
@@ -1467,9 +1474,9 @@ static inline void __skb_queue_purge(str
static inline struct sk_buff *__dev_alloc_skb(unsigned int length,
gfp_t gfp_mask)
{
@@ -31,7 +31,7 @@
return skb;
}
@@ -1556,7 +1563,7 @@ static inline int __skb_cow(struct sk_bu
@@ -1552,7 +1559,7 @@ static inline int __skb_cow(struct sk_bu
delta = headroom - skb_headroom(skb);
if (delta || cloned)

View File

@@ -61,7 +61,7 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
extern int mini_fo_create(inode_t *dir, dentry_t *dentry, int mode, struct nameidata *nd);
@@ -501,6 +505,29 @@ static inline void double_unlock(struct
@@ -501,6 +505,29 @@ static inline void double_unlock(struct
#endif /* if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) */
#endif /* __KERNEL__ */
@@ -127,7 +127,7 @@
#endif /* defined(FIST_DEBUG) || defined(FIST_FILTER_SCA) */
--- a/fs/mini_fo/aux.c
+++ b/fs/mini_fo/aux.c
@@ -164,11 +164,11 @@ dentry_t *bpath_walk(super_block_t *sb,
@@ -164,11 +164,11 @@ dentry_t *bpath_walk(super_block_t *sb,
err = vfs_path_lookup(mnt->mnt_root, mnt, bpath+1, 0, &nd);
/* validate */

View File

@@ -1,6 +1,6 @@
--- a/fs/mini_fo/super.c
+++ b/fs/mini_fo/super.c
@@ -84,6 +84,7 @@ mini_fo_write_inode(inode_t *inode, int
@@ -84,6 +84,7 @@ mini_fo_write_inode(inode_t *inode, int
#endif /* defined(FIST_DEBUG) || defined(FIST_FILTER_SCA) */

View File

@@ -0,0 +1,12 @@
--- a/include/linux/atm.h
+++ b/include/linux/atm.h
@@ -139,6 +139,9 @@ struct atm_trafprm {
int min_pcr; /* minimum PCR in cells per second */
int max_cdv; /* maximum CDV in microseconds */
int max_sdu; /* maximum SDU in bytes */
+ int scr; /* sustained rate in cells per second */
+ int mbs; /* maximum burst size (MBS) in cells */
+ int cdv; /* Cell delay varition */
/* extra params for ABR */
unsigned int icr; /* Initial Cell Rate (24-bit) */
unsigned int tbe; /* Transient Buffer Exposure (24-bit) */

View File

@@ -11,7 +11,7 @@
endif # NEW_LEDS
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -44,3 +44,4 @@ obj-$(CONFIG_LEDS_TRIGGER_HEARTBEAT) +=
@@ -44,3 +44,4 @@ obj-$(CONFIG_LEDS_TRIGGER_HEARTBEAT) +=
obj-$(CONFIG_LEDS_TRIGGER_BACKLIGHT) += ledtrig-backlight.o
obj-$(CONFIG_LEDS_TRIGGER_GPIO) += ledtrig-gpio.o
obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON) += ledtrig-default-on.o

View File

@@ -14,7 +14,7 @@
endif # NEW_LEDS
--- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile
@@ -45,3 +45,4 @@ obj-$(CONFIG_LEDS_TRIGGER_BACKLIGHT) +=
@@ -45,3 +45,4 @@ obj-$(CONFIG_LEDS_TRIGGER_BACKLIGHT) +=
obj-$(CONFIG_LEDS_TRIGGER_GPIO) += ledtrig-gpio.o
obj-$(CONFIG_LEDS_TRIGGER_DEFAULT_ON) += ledtrig-default-on.o
obj-$(CONFIG_LEDS_TRIGGER_MORSE) += ledtrig-morse.o

View File

@@ -601,7 +601,7 @@
dev->checkpointBlockList[i] = -1;
}
@@ -191,18 +185,17 @@ int yaffs_GetCheckpointSum(yaffs_Device
@@ -191,18 +185,17 @@ int yaffs_GetCheckpointSum(yaffs_Device
static int yaffs_CheckpointFlushBuffer(yaffs_Device *dev)
{
@@ -926,7 +926,7 @@
{
unsigned char cDelta; /* column parity delta */
unsigned lDelta; /* line parity delta */
@@ -294,8 +292,7 @@ int yaffs_ECCCorrectOther(unsigned char
@@ -294,8 +292,7 @@ int yaffs_ECCCorrectOther(unsigned char
return 0; /* no error */
if (lDelta == ~lDeltaPrime &&
@@ -936,7 +936,7 @@
/* Single bit (recoverable) error in data */
bit = 0;
@@ -307,7 +304,7 @@ int yaffs_ECCCorrectOther(unsigned char
@@ -307,7 +304,7 @@ int yaffs_ECCCorrectOther(unsigned char
if (cDelta & 0x02)
bit |= 0x01;
@@ -945,7 +945,7 @@
return -1;
data[lDelta] ^= (1 << bit);
@@ -316,7 +313,7 @@ int yaffs_ECCCorrectOther(unsigned char
@@ -316,7 +313,7 @@ int yaffs_ECCCorrectOther(unsigned char
}
if ((yaffs_CountBits32(lDelta) + yaffs_CountBits32(lDeltaPrime) +
@@ -954,7 +954,7 @@
/* Reccoverable error in ecc */
*read_ecc = *test_ecc;
@@ -326,6 +323,4 @@ int yaffs_ECCCorrectOther(unsigned char
@@ -326,6 +323,4 @@ int yaffs_ECCCorrectOther(unsigned char
/* Unrecoverable error */
return -1;
@@ -1398,7 +1398,7 @@
{
unsigned char *alias;
int ret;
@@ -329,7 +395,7 @@ static int yaffs_readlink(struct dentry
@@ -329,7 +395,7 @@ static int yaffs_readlink(struct dentry
return ret;
}
@@ -1560,7 +1560,7 @@
static int yaffs_file_flush(struct file *file, fl_owner_t id)
#else
static int yaffs_file_flush(struct file *file)
@@ -513,8 +579,8 @@ static int yaffs_file_flush(struct file
@@ -513,8 +579,8 @@ static int yaffs_file_flush(struct file
yaffs_Device *dev = obj->myDev;
T(YAFFS_TRACE_OS,
@@ -1571,7 +1571,7 @@
yaffs_GrossLock(dev);
@@ -535,15 +601,15 @@ static int yaffs_readpage_nolock(struct
@@ -535,15 +601,15 @@ static int yaffs_readpage_nolock(struct
yaffs_Device *dev;
@@ -1591,7 +1591,7 @@
BUG_ON(!PageLocked(pg));
#else
if (!PageLocked(pg))
@@ -555,9 +621,9 @@ static int yaffs_readpage_nolock(struct
@@ -555,9 +621,9 @@ static int yaffs_readpage_nolock(struct
yaffs_GrossLock(dev);
@@ -1604,7 +1604,7 @@
yaffs_GrossUnlock(dev);
@@ -575,7 +641,7 @@ static int yaffs_readpage_nolock(struct
@@ -575,7 +641,7 @@ static int yaffs_readpage_nolock(struct
flush_dcache_page(pg);
kunmap(pg);
@@ -3193,7 +3193,7 @@
if (n < step) {
n++;
continue;
@@ -2119,7 +2356,7 @@ static int yaffs_proc_write(struct file
@@ -2119,7 +2356,7 @@ static int yaffs_proc_write(struct file
char *end;
char *mask_name;
const char *x;
@@ -3202,7 +3202,7 @@
int i;
int done = 0;
int add, len = 0;
@@ -2129,9 +2366,8 @@ static int yaffs_proc_write(struct file
@@ -2129,9 +2366,8 @@ static int yaffs_proc_write(struct file
while (!done && (pos < count)) {
done = 1;
@@ -3213,7 +3213,7 @@
switch (buf[pos]) {
case '+':
@@ -2148,20 +2384,21 @@ static int yaffs_proc_write(struct file
@@ -2148,20 +2384,21 @@ static int yaffs_proc_write(struct file
mask_name = NULL;
mask_bitfield = simple_strtoul(buf + pos, &end, 0);
@@ -3240,7 +3240,7 @@
mask_name = mask_flags[i].mask_name;
mask_bitfield = mask_flags[i].mask_bitfield;
done = 0;
@@ -2172,7 +2409,7 @@ static int yaffs_proc_write(struct file
@@ -2172,7 +2409,7 @@ static int yaffs_proc_write(struct file
if (mask_name != NULL) {
done = 0;
@@ -3249,7 +3249,7 @@
case '-':
rg &= ~mask_bitfield;
break;
@@ -2191,13 +2428,13 @@ static int yaffs_proc_write(struct file
@@ -2191,13 +2428,13 @@ static int yaffs_proc_write(struct file
yaffs_traceMask = rg | YAFFS_TRACE_ALWAYS;
@@ -5691,7 +5691,7 @@
{
/* Get the real object in case we were fed a hard link as an equivalent object */
equivalentObject = yaffs_GetEquivalentObject(equivalentObject);
@@ -2363,33 +2396,31 @@ yaffs_Object *yaffs_Link(yaffs_Object *
@@ -2363,33 +2396,31 @@ yaffs_Object *yaffs_Link(yaffs_Object *
}
@@ -7622,7 +7622,7 @@
int nToCopy;
int n = nBytes;
int nDone = 0;
@@ -4600,27 +4665,26 @@ int yaffs_ReadDataFromFile(yaffs_Object
@@ -4600,27 +4665,26 @@ int yaffs_ReadDataFromFile(yaffs_Object
dev = in->myDev;
while (n > 0) {
@@ -7657,7 +7657,7 @@
if (dev->nShortOpCaches > 0) {
/* If we can't find the data in the cache, then load it up. */
@@ -4641,14 +4705,9 @@ int yaffs_ReadDataFromFile(yaffs_Object
@@ -4641,14 +4705,9 @@ int yaffs_ReadDataFromFile(yaffs_Object
cache->locked = 1;
@@ -7673,7 +7673,7 @@
cache->locked = 0;
} else {
/* Read into the local buffer then copy..*/
@@ -4657,41 +4716,19 @@ int yaffs_ReadDataFromFile(yaffs_Object
@@ -4657,41 +4716,19 @@ int yaffs_ReadDataFromFile(yaffs_Object
yaffs_GetTempBuffer(dev, __LINE__);
yaffs_ReadChunkDataFromObject(in, chunk,
localBuffer);
@@ -7718,7 +7718,7 @@
}
n -= nToCopy;
@@ -4704,28 +4741,37 @@ int yaffs_ReadDataFromFile(yaffs_Object
@@ -4704,28 +4741,37 @@ int yaffs_ReadDataFromFile(yaffs_Object
return nDone;
}
@@ -7923,7 +7923,7 @@
int newFullChunks;
yaffs_Device *dev = in->myDev;
@@ -4955,13 +4981,11 @@ int yaffs_ResizeFile(yaffs_Object * in,
@@ -4955,13 +4981,11 @@ int yaffs_ResizeFile(yaffs_Object * in,
yaffs_CheckGarbageCollection(dev);
@@ -7941,7 +7941,7 @@
if (newSize < oldFileSize) {
@@ -4994,21 +5018,20 @@ int yaffs_ResizeFile(yaffs_Object * in,
@@ -4994,21 +5018,20 @@ int yaffs_ResizeFile(yaffs_Object * in,
}
@@ -7968,7 +7968,7 @@
{
obj = yaffs_GetEquivalentObject(obj);
@@ -5024,7 +5047,7 @@ loff_t yaffs_GetFileSize(yaffs_Object *
@@ -5024,7 +5047,7 @@ loff_t yaffs_GetFileSize(yaffs_Object *
@@ -9789,7 +9789,7 @@
{
int init_failed = 0;
unsigned x;
@@ -7040,6 +7126,8 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7040,6 +7126,8 @@ int yaffs_GutsInitialise(yaffs_Device *
dev->chunkOffset = 0;
dev->nFreeChunks = 0;
@@ -9798,7 +9798,7 @@
if (dev->startBlock == 0) {
dev->internalStartBlock = dev->startBlock + 1;
dev->internalEndBlock = dev->endBlock + 1;
@@ -7049,18 +7137,18 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7049,18 +7137,18 @@ int yaffs_GutsInitialise(yaffs_Device *
/* Check geometry parameters. */
@@ -9823,7 +9823,7 @@
return YAFFS_FAIL;
}
@@ -7070,6 +7158,12 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7070,6 +7158,12 @@ int yaffs_GutsInitialise(yaffs_Device *
return YAFFS_FAIL;
}
@@ -9836,7 +9836,7 @@
/* Got the right mix of functions? */
if (!yaffs_CheckDevFunctions(dev)) {
/* Function missing */
@@ -7097,31 +7191,18 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7097,31 +7191,18 @@ int yaffs_GutsInitialise(yaffs_Device *
dev->isMounted = 1;
@@ -9875,7 +9875,7 @@
/*
* Calculate chunkGroupBits.
@@ -7133,16 +7214,15 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7133,16 +7214,15 @@ int yaffs_GutsInitialise(yaffs_Device *
bits = ShiftsGE(x);
/* Set up tnode width if wide tnodes are enabled. */
@@ -9896,7 +9896,7 @@
dev->tnodeWidth = 16;
dev->tnodeMask = (1<<dev->tnodeWidth)-1;
@@ -7193,7 +7273,7 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7193,7 +7273,7 @@ int yaffs_GutsInitialise(yaffs_Device *
dev->hasPendingPrioritisedGCs = 1; /* Assume the worst for now, will get fixed on first GC */
/* Initialise temporary buffers and caches. */
@@ -9905,7 +9905,7 @@
init_failed = 1;
dev->srCache = NULL;
@@ -7203,25 +7283,26 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7203,25 +7283,26 @@ int yaffs_GutsInitialise(yaffs_Device *
if (!init_failed &&
dev->nShortOpCaches > 0) {
int i;
@@ -9940,7 +9940,7 @@
init_failed = 1;
dev->srLastUse = 0;
@@ -7229,29 +7310,30 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7229,29 +7310,30 @@ int yaffs_GutsInitialise(yaffs_Device *
dev->cacheHits = 0;
@@ -9979,7 +9979,7 @@
T(YAFFS_TRACE_ALWAYS,
(TSTR("yaffs: restored from checkpoint" TENDSTR)));
} else {
@@ -7273,24 +7355,25 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7273,24 +7355,25 @@ int yaffs_GutsInitialise(yaffs_Device *
dev->nBackgroundDeletions = 0;
dev->oldestDirtySequence = 0;
@@ -10011,7 +10011,7 @@
/* Clean up the mess */
T(YAFFS_TRACE_TRACING,
(TSTR("yaffs: yaffs_GutsInitialise() aborted.\n" TENDSTR)));
@@ -7318,7 +7401,7 @@ int yaffs_GutsInitialise(yaffs_Device *
@@ -7318,7 +7401,7 @@ int yaffs_GutsInitialise(yaffs_Device *
}
@@ -10710,7 +10710,7 @@
{
if (etags) {
memset(etags, 0, sizeof(*etags));
@@ -169,9 +169,9 @@ static int rettags(yaffs_ExtendedTags *
@@ -169,9 +169,9 @@ static int rettags(yaffs_ExtendedTags *
* Returns YAFFS_OK or YAFFS_FAIL.
*/
int nandmtd1_ReadChunkWithTagsFromNAND(yaffs_Device *dev,
@@ -11038,14 +11038,14 @@
+ yaffs_UnpackTags2(tags, &pt);
+ }
+ }
- if(tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
- tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;
+
+ if (localData)
+ yaffs_ReleaseTempBuffer(dev, data, __LINE__);
- if(tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
+ if (tags && retval == -EBADMSG && tags->eccResult == YAFFS_ECC_RESULT_NO_ERROR)
+ tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;
tags->eccResult = YAFFS_ECC_RESULT_UNFIXED;
-
if (retval == 0)
return YAFFS_OK;
else

View File

@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/hostap/hostap_ap.c
+++ b/drivers/net/wireless/hostap/hostap_ap.c
@@ -2335,13 +2335,13 @@ int prism2_ap_get_sta_qual(local_info_t
@@ -2335,13 +2335,13 @@ int prism2_ap_get_sta_qual(local_info_t
addr[count].sa_family = ARPHRD_ETHER;
memcpy(addr[count].sa_data, sta->addr, ETH_ALEN);
if (sta->last_rx_silence == 0)

View File

@@ -8,7 +8,7 @@
#include <linux/ioport.h>
#include <linux/pci.h>
@@ -48,6 +49,7 @@ static struct pci_device_id divil_pci[]
@@ -48,6 +49,7 @@ static struct pci_device_id divil_pci[]
MODULE_DEVICE_TABLE(pci, divil_pci);
static struct cdev cs5535_gpio_cdev;

View File

@@ -1,6 +1,6 @@
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -137,7 +137,7 @@
@@ -137,7 +137,7 @@ static inline bool dev_xmit_complete(int
*/
#if defined(CONFIG_WLAN) || defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)

View File

@@ -24,7 +24,7 @@
* All of these routines try to estimate how many bits of randomness a
* particular randomness source. They do this by keeping track of the
* first and second order deltas of the event timings.
@@ -714,6 +724,61 @@ void add_disk_randomness(struct gendisk
@@ -714,6 +724,61 @@ void add_disk_randomness(struct gendisk
}
#endif

View File

@@ -76,7 +76,7 @@
* macro override instead of weak attribute alias, to workaround
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6149,6 +6149,7 @@ int can_nice(const struct task_struct *p
@@ -6171,6 +6171,7 @@ int can_nice(const struct task_struct *p
return (nice_rlim <= p->signal->rlim[RLIMIT_NICE].rlim_cur ||
capable(CAP_SYS_NICE));
}

View File

@@ -1,6 +1,6 @@
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -238,7 +238,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
@@ -238,7 +238,7 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
quiet_cmd_lzma = LZMA $@
cmd_lzma = (cat $(filter-out FORCE,$^) | \

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
--- a/arch/mips/kernel/machine_kexec.c 2010-03-15 15:52:04.000000000 +0000
+++ b/arch/mips/kernel/machine_kexec.c 2010-03-29 12:10:37.000000000 +0100
@@ -52,7 +52,7 @@
reboot_code_buffer =
(unsigned long)page_address(image->control_code_page);
- kexec_start_address = image->start;
+ kexec_start_address = (unsigned long) phys_to_virt(image->start);
kexec_indirection_page =
(unsigned long) phys_to_virt(image->head & PAGE_MASK);

View File

@@ -1,25 +1,22 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/image.mk
JFFS2_BLOCKSIZE=124k
JFFS2OPTS += -n -s 2048
_PREFIX=openwrt-goldfish-
define Image/BuildKernel
$(TARGET_CROSS)objcopy -O binary -R .note -R .comment -S \
$(LINUX_DIR)/arch/arm/boot/compressed/vmlinux $(BIN_DIR)/$(_PREFIX)kernel.bin
$(LINUX_DIR)/arch/arm/boot/compressed/vmlinux $(BIN_DIR)/$(IMG_PREFIX)-kernel.bin
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS), \
$(CP) $(LINUX_DIR)/usr/initramfs_data.cpio.gz, \
gzip -c < $(LINUX_DIR)/usr/initramfs_data.cpio > \
) $(BIN_DIR)/$(_PREFIX)ramdisk.bin
) $(BIN_DIR)/$(IMG_PREFIX)-ramdisk.bin
$(CP) ./run-emulator.sh $(BIN_DIR)/
endef
@@ -27,12 +24,12 @@ define Image/Build/jffs2-124k
$(CP) ./ubinize.cfg $(KDIR)/
(cd $(KDIR); \
ubinize \
-o $(BIN_DIR)/$(_PREFIX)$(1).img \
-o $(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
-p 128KiB -m 2KiB -s 2KiB ubinize.cfg; \
)
nand_ecc \
$(BIN_DIR)/$(_PREFIX)$(1).img \
$(BIN_DIR)/$(_PREFIX)system.bin
$(BIN_DIR)/$(IMG_PREFIX)-$(1).img \
$(BIN_DIR)/$(IMG_PREFIX)-system.bin
endef
define Image/Build

View File

@@ -10,8 +10,10 @@ ARCH:=mips
BOARD:=ifxmips
BOARDNAME:=Infineon Mips
FEATURES:=squashfs jffs2 atm
SUBTARGETS:=danube #ar9
LINUX_VERSION:=2.6.30.10
#LINUX_VERSION:=2.6.33.2
CFLAGS=-Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time

View File

@@ -0,0 +1,220 @@
CONFIG_32BIT=y
# CONFIG_64BIT is not set
CONFIG_ADM6996_PHY=y
# CONFIG_ALCHEMY_GPIO_INDIRECT is not set
# CONFIG_AR7 is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_POPULATES_NODE_MAP=y
CONFIG_ARCH_REQUIRE_GPIOLIB=y
# CONFIG_ARCH_SUPPORTS_MSI is not set
CONFIG_ARCH_SUPPORTS_OPROFILE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_BCM47XX is not set
# CONFIG_BCM63XX is not set
CONFIG_BITREVERSE=y
# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set
# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set
CONFIG_CEVT_R4K=y
CONFIG_CEVT_R4K_LIB=y
CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2"
CONFIG_CMDLINE_BOOL=y
# CONFIG_CMDLINE_OVERRIDE is not set
CONFIG_CPU_BIG_ENDIAN=y
# CONFIG_CPU_CAVIUM_OCTEON is not set
CONFIG_CPU_HAS_PREFETCH=y
CONFIG_CPU_HAS_SYNC=y
# CONFIG_CPU_LITTLE_ENDIAN is not set
# CONFIG_CPU_LOONGSON2E is not set
# CONFIG_CPU_LOONGSON2F is not set
CONFIG_CPU_MIPS32=y
# CONFIG_CPU_MIPS32_R1 is not set
CONFIG_CPU_MIPS32_R2=y
# CONFIG_CPU_MIPS64_R1 is not set
# CONFIG_CPU_MIPS64_R2 is not set
CONFIG_CPU_MIPSR2=y
# CONFIG_CPU_NEVADA is not set
# CONFIG_CPU_R10000 is not set
# CONFIG_CPU_R3000 is not set
# CONFIG_CPU_R4300 is not set
# CONFIG_CPU_R4X00 is not set
# CONFIG_CPU_R5000 is not set
# CONFIG_CPU_R5432 is not set
# CONFIG_CPU_R5500 is not set
# CONFIG_CPU_R6000 is not set
# CONFIG_CPU_R8000 is not set
# CONFIG_CPU_RM7000 is not set
# CONFIG_CPU_RM9000 is not set
# CONFIG_CPU_SB1 is not set
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
CONFIG_CPU_SUPPORTS_HIGHMEM=y
# CONFIG_CPU_TX39XX is not set
# CONFIG_CPU_TX49XX is not set
# CONFIG_CPU_VR41XX is not set
CONFIG_CSRC_R4K=y
CONFIG_CSRC_R4K_LIB=y
CONFIG_DANUBE_MACH_ARV4519=y
CONFIG_DANUBE_MACH_ARV452=y
CONFIG_DANUBE_MACH_EASY4010=y
CONFIG_DANUBE_MACH_EASY50712=y
CONFIG_DECOMPRESS_LZMA=y
# CONFIG_DEFAULT_SECURITY_SELINUX is not set
# CONFIG_DEFAULT_SECURITY_SMACK is not set
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
CONFIG_DEVPORT=y
# CONFIG_DM9000 is not set
CONFIG_DMA_NEED_PCI_MAP_STATE=y
CONFIG_DMA_NONCOHERENT=y
CONFIG_EARLY_PRINTK=y
# CONFIG_FSNOTIFY is not set
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_GPIO=y
CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
CONFIG_GPIOLIB=y
CONFIG_GPIO_SYSFS=y
CONFIG_HARDWARE_WATCHPOINTS=y
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_HAVE_IDE=y
CONFIG_HAVE_OPROFILE=y
CONFIG_HAVE_STD_PC_SERIAL_PORT=y
# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_HW_HAS_PCI=y
CONFIG_HW_RANDOM=y
CONFIG_HZ=250
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
CONFIG_IFXMIPS=y
CONFIG_IFXMIPS_ARCAYDIAN_BRNBOOT=y
CONFIG_IFXMIPS_COMPAT=y
CONFIG_IFXMIPS_DANUBE=y
CONFIG_IFXMIPS_MII0=y
# CONFIG_IFXMIPS_PROM_ASC0 is not set
CONFIG_IFXMIPS_PROM_ASC1=y
CONFIG_IFXMIPS_WDT=y
CONFIG_INITRAMFS_SOURCE=""
# CONFIG_INLINE_READ_LOCK is not set
# CONFIG_INLINE_READ_LOCK_BH is not set
# CONFIG_INLINE_READ_LOCK_IRQ is not set
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
# CONFIG_INLINE_READ_TRYLOCK is not set
CONFIG_INLINE_READ_UNLOCK=y
# CONFIG_INLINE_READ_UNLOCK_BH is not set
CONFIG_INLINE_READ_UNLOCK_IRQ=y
# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_SPIN_LOCK is not set
# CONFIG_INLINE_SPIN_LOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
# CONFIG_INLINE_SPIN_TRYLOCK is not set
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
CONFIG_INLINE_SPIN_UNLOCK=y
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_WRITE_LOCK is not set
# CONFIG_INLINE_WRITE_LOCK_BH is not set
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
# CONFIG_INLINE_WRITE_TRYLOCK is not set
CONFIG_INLINE_WRITE_UNLOCK=y
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
CONFIG_IRQ_CPU=y
# CONFIG_ISDN_CAPI is not set
# CONFIG_ISDN_DRV_GIGASET is not set
# CONFIG_ISDN_I4L is not set
CONFIG_KALLSYMS=y
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_IFXMIPS=y
CONFIG_LOONGSON_UART_BASE=y
# CONFIG_MACH_ALCHEMY is not set
# CONFIG_MACH_DECSTATION is not set
# CONFIG_MACH_JAZZ is not set
# CONFIG_MACH_LOONGSON is not set
# CONFIG_MACH_TX39XX is not set
# CONFIG_MACH_TX49XX is not set
# CONFIG_MACH_VR41XX is not set
# CONFIG_MIKROTIK_RB532 is not set
CONFIG_MIPS=y
# CONFIG_MIPS_COBALT is not set
CONFIG_MIPS_L1_CACHE_SHIFT=5
CONFIG_MIPS_MACHINE=y
# CONFIG_MIPS_MALTA is not set
CONFIG_MIPS_MT_DISABLED=y
# CONFIG_MIPS_MT_SMP is not set
# CONFIG_MIPS_MT_SMTC is not set
# CONFIG_MIPS_SIM is not set
# CONFIG_MIPS_VPE_LOADER is not set
CONFIG_MTD_CFI_ADV_OPTIONS=y
CONFIG_MTD_CFI_GEOMETRY=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_IFXMIPS=y
# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
# CONFIG_MUTEX_SPIN_ON_OWNER is not set
CONFIG_NLS=y
# CONFIG_NO_IOPORT is not set
# CONFIG_NXP_STB220 is not set
# CONFIG_NXP_STB225 is not set
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PHYLIB=y
# CONFIG_PMC_MSP is not set
# CONFIG_PMC_YOSEMITE is not set
# CONFIG_PNX8550_JBS is not set
# CONFIG_PNX8550_STB810 is not set
# CONFIG_POWERTV is not set
CONFIG_RTL8306_PHY=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
# CONFIG_SCSI_DMA is not set
# CONFIG_SERIAL_8250 is not set
CONFIG_SERIAL_IFXMIPS=y
# CONFIG_SGI_IP22 is not set
# CONFIG_SGI_IP27 is not set
# CONFIG_SGI_IP28 is not set
# CONFIG_SGI_IP32 is not set
# CONFIG_SIBYTE_BIGSUR is not set
# CONFIG_SIBYTE_CARMEL is not set
# CONFIG_SIBYTE_CRHINE is not set
# CONFIG_SIBYTE_CRHONE is not set
# CONFIG_SIBYTE_LITTLESUR is not set
# CONFIG_SIBYTE_RHONE is not set
# CONFIG_SIBYTE_SENTOSA is not set
# CONFIG_SIBYTE_SWARM is not set
CONFIG_SOC_DANUBE=y
CONFIG_SWAP_IO_SPACE=y
CONFIG_SWCONFIG=y
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
CONFIG_SYS_HAS_CPU_MIPS32_R2=y
CONFIG_SYS_HAS_EARLY_PRINTK=y
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
CONFIG_SYS_SUPPORTS_MULTITHREADING=y
# CONFIG_TC35815 is not set
# CONFIG_TINY_RCU is not set
CONFIG_TRAD_SIGNALS=y
# CONFIG_TREE_PREEMPT_RCU is not set
CONFIG_TREE_RCU=y
CONFIG_USB=y
CONFIG_USB_DEBUG=y
# CONFIG_USB_EHCI_HCD is not set
CONFIG_USB_SUPPORT=y
# CONFIG_USB_UHCI_HCD is not set
CONFIG_ZONE_DMA_FLAG=0

View File

@@ -0,0 +1,9 @@
ARCH:=mips
SUBTARGET:=danube
BOARDNAME:=Danube
FEATURES:=squashfs jffs2
define Target/Description
Infineon Danube
endef

Some files were not shown because too many files have changed in this diff Show More