Skip to content

Commit

Permalink
Merge branch 'master' of /home/cero1/src/openwrt
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Taht committed Apr 9, 2012
2 parents 91fa6ab + dddf2cb commit 00ce40d
Show file tree
Hide file tree
Showing 54 changed files with 15,629 additions and 48 deletions.
12 changes: 8 additions & 4 deletions include/prereq-build.mk
@@ -1,5 +1,5 @@
#
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2006-2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
Expand All @@ -20,7 +20,7 @@ $(eval $(call Require,non-root, \

# Required for the toolchain
define Require/working-make
$(MAKE) -v | awk '($$$$1 == "GNU") && ($$$$2 = "Make") && ($$$$3 >= "3.81") { print "ok" }' | grep ok > /dev/null
$(MAKE) -v | awk '($$$$1 == "GNU") && ($$$$2 == "Make") && ($$$$3 >= "3.81") { print "ok" }' | grep ok > /dev/null
endef

$(eval $(call Require,working-make, \
Expand Down Expand Up @@ -121,8 +121,12 @@ $(eval $(call RequireCommand,wget, \
Please install wget. \
))

$(eval $(call RequireCommand,git, \
Please install git (git-core). \
define Require/git
git --version | awk '($$$$1 == "git") && ($$$$2 == "version") && ($$$$3 >= "1.6.5") { print "ok" }' | grep ok > /dev/null
endef

$(eval $(call Require,git, \
Please install git (git-core) v1.6.5 or later. \
))

define Require/gnutar
Expand Down
5 changes: 3 additions & 2 deletions package/libpcap/Makefile
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libpcap
PKG_VERSION:=1.1.1
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
Expand Down Expand Up @@ -52,7 +52,8 @@ CONFIGURE_ARGS += \
--with-build-cc="$(HOSTCC)" \
--with-pcap=linux \
--without-septel \
--without-dag
--without-dag \
--without-libnl

MAKE_FLAGS += \
CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include"
Expand Down
3 changes: 3 additions & 0 deletions target/linux/ar71xx/base-files/etc/diag.sh
Expand Up @@ -90,6 +90,9 @@ get_status_led() {
rb-411 | rb-411u | rb-433 | rb-433u | rb-450 | rb-450g | rb-493)
status_led="rb4xx:yellow:user"
;;
rb-750)
status_led="rb750:green:act"
;;
routerstation | routerstation-pro)
status_led="ubnt:green:rf"
;;
Expand Down
2 changes: 2 additions & 0 deletions target/linux/ar71xx/base-files/etc/uci-defaults/network
Expand Up @@ -63,6 +63,7 @@ routerstation-pro)
;;

rb-750gl |\
rb-751g |\
wzr-hp-g450h)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
Expand Down Expand Up @@ -153,6 +154,7 @@ dir-615-c1 |\
dir-615-e4 |\
ja76pf |\
rb-750 |\
rb-751 |\
tew-632brp |\
tl-mr3220 |\
tl-mr3420 |\
Expand Down
6 changes: 6 additions & 0 deletions target/linux/ar71xx/base-files/lib/ar71xx.sh
Expand Up @@ -250,6 +250,12 @@ ar71xx_board_detect() {
*"RouterBOARD 750GL")
name="rb-750gl"
;;
*"RouterBOARD 751")
name="rb-751"
;;
*"RouterBOARD 751G")
name="rb-751g"
;;
*"Rocket M")
name="rocket-m"
;;
Expand Down
92 changes: 92 additions & 0 deletions target/linux/ar71xx/files/arch/mips/ath79/mach-rb750.c
Expand Up @@ -9,17 +9,24 @@
*/

#include <linux/export.h>
#include <linux/pci.h>
#include <linux/ath9k_platform.h>
#include <linux/platform_device.h>
#include <linux/phy.h>
#include <linux/ar8216_platform.h>

#include <asm/mach-ath79/ar71xx_regs.h>
#include <asm/mach-ath79/ath79.h>
#include <asm/mach-ath79/pci.h>
#include <asm/mach-ath79/irq.h>
#include <asm/mach-ath79/mach-rb750.h>

#include "common.h"
#include "dev-usb.h"
#include "dev-eth.h"
#include "machtypes.h"
#include "pci-ath9k-fixup.h"
#include "pci.h"

static struct rb750_led_data rb750_leds[] = {
{
Expand Down Expand Up @@ -270,3 +277,88 @@ static void __init rb750gr3_setup(void)

MIPS_MACHINE(ATH79_MACH_RB_750G_R3, "750Gr3", "MikroTik RouterBOARD 750GL",
rb750gr3_setup);

static struct ath9k_platform_data rb751_wmac_data = {
.led_pin = -1,
};

static u8 rb751_wmac_mac[6];

static int rb751_pci_plat_dev_init(struct pci_dev *dev)
{
switch (PCI_SLOT(dev->devfn)) {
case 0:
dev->dev.platform_data = &rb751_wmac_data;
break;
}

return 0;
}

static int decode_rle(char *output, int len, char *in)
{
char *ptr = output;
char *end = output + len;
while (*in) {
if (*in < 0) {
int i = -*in++;
while (i-- > 0) {
if (ptr >= end)
return -1;
*ptr++ = *in++;
}
} else if (*in > 0) {
int i = *in++;
while (i-- > 0) {
if (ptr >= end)
return -1;
*ptr++ = *in;
}
in++;
}
}
return ptr - output;
}

#define RB751_HARDCONFIG 0x1f00b000
#define RB751_MAC_ADDRESS_OFFSET 0xE80
#define RB751_CALDATA_OFFSET 0x27C

static void __init rb751_wlan_and_usb_setup(void)
{
u8 *hardconfig = (u8 *) KSEG1ADDR(RB751_HARDCONFIG);

ath79_register_usb();

ath79_pci_set_plat_dev_init(rb751_pci_plat_dev_init);
ath79_register_pci();

rb751_wmac_data.macaddr = memcpy(rb751_wmac_mac,
hardconfig + RB751_MAC_ADDRESS_OFFSET, 6);

if (decode_rle((char *)rb751_wmac_data.eeprom_data,
sizeof(rb751_wmac_data.eeprom_data),
hardconfig + RB751_CALDATA_OFFSET) ==
sizeof(rb751_wmac_data.eeprom_data)) {
pr_info("rb7xx: calibration data found\n");
pci_enable_ath9k_fixup(0, rb751_wmac_data.eeprom_data);
}
}

static void __init rb751_setup(void)
{
rb750_setup();
rb751_wlan_and_usb_setup();
}

MIPS_MACHINE(ATH79_MACH_RB_751, "751", "MikroTik RouterBOARD 751",
rb751_setup);

static void __init rb751g_setup(void)
{
rb750gr3_setup();
rb751_wlan_and_usb_setup();
}

MIPS_MACHINE(ATH79_MACH_RB_751G, "751g", "MikroTik RouterBOARD 751G",
rb751g_setup);
4 changes: 4 additions & 0 deletions target/linux/ar71xx/image/Makefile
Expand Up @@ -204,6 +204,10 @@ define Image/Build/WHRHPG300N
fi
endef

define Image/Build/WHRHPG300N/initramfs
$(call MkuImageLzma/initramfs,$(2),$(3) $(4))
endef

define Image/Build/Cameo
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Sysupgrade/KRuImage,$(1),$(2),$(5),$(6))
Expand Down
@@ -0,0 +1,21 @@
--- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig
@@ -300,6 +300,7 @@ config ATH79_MACH_RB750
bool "MikroTik RouterBOARD 750 support"
select SOC_AR724X
select ATH79_DEV_ETH
+ select ATH79_DEV_USB

config ATH79_MACH_WNDR3700
bool "NETGEAR WNDR3700 board support"
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
@@ -53,6 +53,8 @@ enum ath79_mach_type {
ATH79_MACH_RB_493G, /* Mikrotik RouterBOARD 493G */
ATH79_MACH_RB_750, /* MikroTik RouterBOARD 750 */
ATH79_MACH_RB_750G_R3, /* MikroTik RouterBOARD 750GL */
+ ATH79_MACH_RB_751, /* MikroTik RouterBOARD 751 */
+ ATH79_MACH_RB_751G, /* Mikrotik RouterBOARD 751G */
ATH79_MACH_RW2458N, /* Redwave RW2458N */
ATH79_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
ATH79_MACH_TEW_673GRU, /* TRENDnet TEW-673GRU */
@@ -0,0 +1,21 @@
--- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig
@@ -300,6 +300,7 @@ config ATH79_MACH_RB750
bool "MikroTik RouterBOARD 750 support"
select SOC_AR724X
select ATH79_DEV_ETH
+ select ATH79_DEV_USB

config ATH79_MACH_WNDR3700
bool "NETGEAR WNDR3700 board support"
--- a/arch/mips/ath79/machtypes.h
+++ b/arch/mips/ath79/machtypes.h
@@ -53,6 +53,8 @@ enum ath79_mach_type {
ATH79_MACH_RB_493G, /* Mikrotik RouterBOARD 493G */
ATH79_MACH_RB_750, /* MikroTik RouterBOARD 750 */
ATH79_MACH_RB_750G_R3, /* MikroTik RouterBOARD 750GL */
+ ATH79_MACH_RB_751, /* MikroTik RouterBOARD 751 */
+ ATH79_MACH_RB_751G, /* Mikrotik RouterBOARD 751G */
ATH79_MACH_RW2458N, /* Redwave RW2458N */
ATH79_MACH_TEW_632BRP, /* TRENDnet TEW-632BRP */
ATH79_MACH_TEW_673GRU, /* TRENDnet TEW-673GRU */
29 changes: 29 additions & 0 deletions target/linux/lantiq/files-3.2/arch/mips/lantiq/xway/mach-arv.c
Expand Up @@ -754,3 +754,32 @@ MIPS_MACHINE(LANTIQ_MACH_ARV752DPW22,
"ARV752DPW22",
"ARV752DPW22 - Arcor A803",
arv752dpw22_init);

static void __init
arv752dpw_init(void)
{
#define ARV752DPW22_EBU 0x2
#define ARV752DPW22_USB 100
#define ARV752DPW22_RELAY 101
#define ARV752DPW22_MAC_ADDR 0x7f0016

arv_load_nor(0x800000);
ltq_register_gpio_ebu(ARV752DPW22_EBU);
ltq_add_device_gpio_leds(-1, ARRAY_SIZE(arv752dpw22_gpio_leds), arv752dpw22_gpio_leds);
ltq_register_gpio_keys_polled(-1, LTQ_KEYS_POLL_INTERVAL, ARRAY_SIZE(arv752dpw22_gpio_keys), arv752dpw22_gpio_keys);
ltq_pci_data.irq[14] = (INT_NUM_IM3_IRL0 + 31);
ltq_pci_data.gpio |= PCI_EXIN1 | PCI_REQ2;
ltq_register_pci(&ltq_pci_data);
xway_register_dwc(ARV752DPW22_USB);
ltq_register_rt2x00("RT2860.eeprom");
arv_register_ethernet(ARV752DPW22_MAC_ADDR);
gpio_request(ARV752DPW22_RELAY, "relay");
gpio_set_value(ARV752DPW22_RELAY, 1);
gpio_export(ARV752DPW22_RELAY, 0);

}

MIPS_MACHINE(LANTIQ_MACH_ARV752DPW,
"ARV752DPW",
"ARV752DPW - Arcor A802",
arv752dpw_init);
Expand Up @@ -21,6 +21,7 @@

#include "../machtypes.h"
#include "devices.h"
#include "dev-dwc_otg.h"

static struct ltq_pci_data ltq_pci_data = {
.clock = PCI_CLOCK_INT,
Expand Down Expand Up @@ -77,6 +78,8 @@ static void __init dgn3500_init(void)
ltq_register_pci(&ltq_pci_data);
ltq_register_etop(&ltq_eth_data);
ltq_register_spi(&ltq_spi_data, &spi_info, 1);
/* The usb power is always enabled, protected by a fuse */
xway_register_dwc(-1);
}

MIPS_MACHINE(LANTIQ_MACH_DGN3500B,
Expand Down
2 changes: 1 addition & 1 deletion target/linux/xburst/Makefile
Expand Up @@ -12,7 +12,7 @@ BOARDNAME:=Ingenic XBurst
FEATURES:=jffs2 targz ubifs audio
SUBTARGETS:=qi_lb60 n516 n526 id800wt

LINUX_VERSION:=2.6.37.6
LINUX_VERSION:=3.2.1

DEVICE_TYPE=other

Expand Down

0 comments on commit 00ce40d

Please sign in to comment.