buildscript: use src folder for downloads

This also integrates the ffol packages feed into this repo.

Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
Tim Niemeyer 2013-12-01 14:15:14 +01:00 committed by Marc René Schädler
parent 2aa4ff1360
commit 5cbc7a9816
19 changed files with 7468 additions and 621 deletions

View File

@ -1,4 +1,4 @@
src-svn packages svn://svn.openwrt.org/openwrt/packages@35298
src-git routing https://github.com/openwrt-routing/packages.git^072ba90ce4b126e84d3e1734ba8e9d4beab48f03
src-git fastd git://git.metameute.de/lff/pkg_fastd;v10
src-git packagesol git://freifunk-ol.de/ffol/packages.git;0.3.999d
src-link openwrt PATH/openwrt
src-link routing PATH/routing
src-link fastd PATH/fastd
src-link packagesol PATH/ffol

View File

@ -0,0 +1,283 @@
Index: files/arch/mips/ath79/mach-dir-825-b1.c
===================================================================
--- files/arch/mips/ath79/mach-dir-825-b1.c (Revision 35298)
+++ files/arch/mips/ath79/mach-dir-825-b1.c (Revision 36664)
@@ -138,7 +138,8 @@
static void __init dir825b1_wlan_init(void)
{
u8 *caldata;
- u8 mac1[ETH_ALEN], mac2[ETH_ALEN];
+ u8 mac0[ETH_ALEN], mac1[ETH_ALEN];
+ u8 wmac0[ETH_ALEN], wmac1[ETH_ALEN];
caldata = (u8 *) KSEG1ADDR(DIR825B1_CAL_LOCATION_0);
if (!dir825b1_is_caldata_valid(caldata)) {
@@ -149,17 +150,19 @@
}
}
- dir825b1_read_ascii_mac(mac1, caldata + DIR825B1_MAC0_OFFSET);
- dir825b1_read_ascii_mac(mac2, caldata + DIR825B1_MAC1_OFFSET);
+ dir825b1_read_ascii_mac(mac0, caldata + DIR825B1_MAC0_OFFSET);
+ dir825b1_read_ascii_mac(mac1, caldata + DIR825B1_MAC1_OFFSET);
- ath79_init_mac(ath79_eth0_data.mac_addr, mac1, 2);
- ath79_init_mac(ath79_eth1_data.mac_addr, mac1, 3);
+ ath79_init_mac(ath79_eth0_data.mac_addr, mac0, 0);
+ ath79_init_mac(ath79_eth1_data.mac_addr, mac1, 0);
+ ath79_init_mac(wmac0, mac0, 0);
+ ath79_init_mac(wmac1, mac1, 1);
ap9x_pci_setup_wmac_led_pin(0, 5);
ap9x_pci_setup_wmac_led_pin(1, 5);
- ap94_pci_init(caldata + DIR825B1_CAL0_OFFSET, mac1,
- caldata + DIR825B1_CAL1_OFFSET, mac2);
+ ap94_pci_init(caldata + DIR825B1_CAL0_OFFSET, wmac0,
+ caldata + DIR825B1_CAL1_OFFSET, wmac1);
}
static void __init dir825b1_setup(void)
Index: files/arch/mips/ath79/mach-rb750.c
===================================================================
--- files/arch/mips/ath79/mach-rb750.c (Revision 35298)
+++ files/arch/mips/ath79/mach-rb750.c (Revision 36664)
@@ -282,7 +282,6 @@
#define RB751_HARDCONFIG 0x1f00b000
#define RB751_HARDCONFIG_SIZE 0x1000
-#define RB751_MAC_ADDRESS_OFFSET 0xE80
static void __init rb751_wlan_setup(void)
{
@@ -290,6 +289,8 @@
struct ath9k_platform_data *wmac_data;
u16 tag_len;
u8 *tag;
+ u16 mac_len;
+ u8 *mac;
int err;
wmac_data = ap9x_pci_get_wmac_data(0);
@@ -314,7 +315,14 @@
return;
}
- ap91_pci_init(NULL, hardconfig + RB751_MAC_ADDRESS_OFFSET);
+ err = routerboot_find_tag(hardconfig, RB751_HARDCONFIG_SIZE,
+ RB_ID_MAC_ADDRESS_PACK, &mac, &mac_len);
+ if (err) {
+ pr_err("rb75x: no mac address found\n");
+ return;
+ }
+
+ ap91_pci_init(NULL, mac);
}
static void __init rb751_setup(void)
Index: files/arch/mips/ath79/mach-om2p.c
===================================================================
--- files/arch/mips/ath79/mach-om2p.c (Revision 35298)
+++ files/arch/mips/ath79/mach-om2p.c (Revision 36664)
@@ -187,7 +187,7 @@
/* enable reset button */
ath79_gpio_output_select(OM2P_GPIO_BTN_RESET, AR934X_GPIO_OUT_GPIO);
- ath79_gpio_function_enable(AR933X_GPIO_FUNC_JTAG_DISABLE);
+ ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE);
om2p_leds_gpio[4].gpio = OM2P_GPIO_LED_WAN;
om2p_leds_gpio[5].gpio = OM2P_GPIO_LED_LAN;
Index: files/arch/mips/ath79/mach-rb4xx.c
===================================================================
--- files/arch/mips/ath79/mach-rb4xx.c (Revision 35298)
+++ files/arch/mips/ath79/mach-rb4xx.c (Revision 36664)
@@ -429,6 +429,9 @@
rb4xx_leds_gpio);
spi_register_board_info(rb4xx_spi_info, ARRAY_SIZE(rb4xx_spi_info));
+ spi_register_board_info(rb4xx_microsd_info,
+ ARRAY_SIZE(rb4xx_microsd_info));
+
platform_device_register(&rb4xx_spi_device);
platform_device_register(&rb4xx_nand_device);
Index: image/Makefile
===================================================================
--- image/Makefile (Revision 35298)
+++ image/Makefile (Revision 36664)
@@ -279,6 +279,10 @@
fi
endef
+define Image/Build/WZRHPG30XNH/initramfs
+ $(call MkuImageLzma/initramfs,$(2),$(3) $(4))
+endef
+
define Image/Build/WHRHPG300N
$(call MkuImageLzma,$(2),$(3) $(4))
$(call Sysupgrade/KRuImage,$(1),$(2),983040,2883584)
Index: patches-3.3/480-ar913x_wmac_external_reset.patch
===================================================================
--- patches-3.3/480-ar913x_wmac_external_reset.patch (Revision 0)
+++ patches-3.3/480-ar913x_wmac_external_reset.patch (Revision 36664)
@@ -0,0 +1,31 @@
+--- a/arch/mips/ath79/dev-wmac.c
++++ b/arch/mips/ath79/dev-wmac.c
+@@ -44,7 +44,7 @@ static struct platform_device ath79_wmac
+ },
+ };
+
+-static void __init ar913x_wmac_setup(void)
++static int ar913x_wmac_reset(void)
+ {
+ /* reset the WMAC */
+ ath79_device_reset_set(AR913X_RESET_AMBA2WMAC);
+@@ -53,10 +53,19 @@ static void __init ar913x_wmac_setup(voi
+ ath79_device_reset_clear(AR913X_RESET_AMBA2WMAC);
+ mdelay(10);
+
++ return 0;
++}
++
++static void __init ar913x_wmac_setup(void)
++{
++ ar913x_wmac_reset();
++
+ ath79_wmac_resources[0].start = AR913X_WMAC_BASE;
+ ath79_wmac_resources[0].end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1;
+ ath79_wmac_resources[1].start = ATH79_CPU_IRQ_IP2;
+ ath79_wmac_resources[1].end = ATH79_CPU_IRQ_IP2;
++
++ ath79_wmac_data.external_reset = ar913x_wmac_reset;
+ }
+
+
Index: patches-3.3/505-MIPS-ath79-add-ath79_gpio_function_select.patch
===================================================================
--- patches-3.3/505-MIPS-ath79-add-ath79_gpio_function_select.patch (Revision 35298)
+++ patches-3.3/505-MIPS-ath79-add-ath79_gpio_function_select.patch (Revision 36664)
@@ -10,7 +10,7 @@
#endif /* __ATH79_COMMON_H */
--- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c
-@@ -198,6 +198,34 @@ void ath79_gpio_function_setup(u32 set,
+@@ -198,6 +198,34 @@ void ath79_gpio_function_setup(u32 set,
spin_unlock_irqrestore(&ath79_gpio_lock, flags);
}
Index: patches-3.3/620-MIPS-ath79-OTP-support.patch
===================================================================
--- patches-3.3/620-MIPS-ath79-OTP-support.patch (Revision 35298)
+++ patches-3.3/620-MIPS-ath79-OTP-support.patch (Revision 36664)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
-@@ -139,6 +139,137 @@ static void qca955x_wmac_setup(void)
+@@ -148,6 +148,137 @@ static void qca955x_wmac_setup(void)
ath79_wmac_data.is_clk_25mhz = true;
}
Index: patches-3.3/601-MIPS-ath79-add-more-register-defines.patch
===================================================================
--- patches-3.3/601-MIPS-ath79-add-more-register-defines.patch (Revision 35298)
+++ patches-3.3/601-MIPS-ath79-add-more-register-defines.patch (Revision 36664)
@@ -166,7 +166,7 @@
#define AR934X_GPIO_REG_FUNC 0x6c
#define AR71XX_GPIO_COUNT 16
-@@ -550,4 +618,133 @@
+@@ -550,4 +618,139 @@
#define AR934X_SRIF_DPLL2_OUTDIV_SHIFT 13
#define AR934X_SRIF_DPLL2_OUTDIV_MASK 0x7
@@ -227,9 +227,15 @@
+#define AR933X_GPIO_FUNC_UART_EN BIT(1)
+#define AR933X_GPIO_FUNC_JTAG_DISABLE BIT(0)
+
-+#define AR934X_GPIO_FUNC_DDR_DQOE_EN BIT(17)
-+#define AR934X_GPIO_FUNC_SPI_CS_1_EN BIT(14)
-+#define AR934X_GPIO_FUNC_SPI_CS_0_EN BIT(13)
++#define AR934X_GPIO_FUNC_CLK_OBS7_EN BIT(9)
++#define AR934X_GPIO_FUNC_CLK_OBS6_EN BIT(8)
++#define AR934X_GPIO_FUNC_CLK_OBS5_EN BIT(7)
++#define AR934X_GPIO_FUNC_CLK_OBS4_EN BIT(6)
++#define AR934X_GPIO_FUNC_CLK_OBS3_EN BIT(5)
++#define AR934X_GPIO_FUNC_CLK_OBS2_EN BIT(4)
++#define AR934X_GPIO_FUNC_CLK_OBS1_EN BIT(3)
++#define AR934X_GPIO_FUNC_CLK_OBS0_EN BIT(2)
++#define AR934X_GPIO_FUNC_JTAG_DISABLE BIT(1)
+
+#define AR934X_GPIO_OUT_GPIO 0x00
+
Index: patches-3.3/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch
===================================================================
--- patches-3.3/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch (Revision 35298)
+++ patches-3.3/501-MIPS-ath79-add-mac-argument-to-ath79_register_wmac.patch (Revision 36664)
@@ -16,7 +16,7 @@
static struct ath9k_platform_data ath79_wmac_data;
static struct resource ath79_wmac_resources[] = {
-@@ -134,7 +136,7 @@ static void qca955x_wmac_setup(void)
+@@ -143,7 +145,7 @@ static void qca955x_wmac_setup(void)
ath79_wmac_data.is_clk_25mhz = true;
}
@@ -25,7 +25,7 @@
{
if (soc_is_ar913x())
ar913x_wmac_setup();
-@@ -151,5 +153,10 @@ void __init ath79_register_wmac(u8 *cal_
+@@ -160,5 +162,10 @@ void __init ath79_register_wmac(u8 *cal_
memcpy(ath79_wmac_data.eeprom_data, cal_data,
sizeof(ath79_wmac_data.eeprom_data));
Index: patches-3.3/621-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch
===================================================================
--- patches-3.3/621-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch (Revision 35298)
+++ patches-3.3/621-MIPS-ath79-add-ath79_wmac_disable_25ghz-helpers.patch (Revision 36664)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
-@@ -270,6 +270,16 @@ bool __init ar93xx_wmac_read_mac_address
+@@ -279,6 +279,16 @@ bool __init ar93xx_wmac_read_mac_address
return ret;
}
Index: patches-3.3/650-MIPS-ath79-fix-ar933x-reset.patch
===================================================================
--- patches-3.3/650-MIPS-ath79-fix-ar933x-reset.patch (Revision 35298)
+++ patches-3.3/650-MIPS-ath79-fix-ar933x-reset.patch (Revision 36664)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
-@@ -67,10 +67,27 @@ static void __init ar913x_wmac_setup(voi
+@@ -76,10 +76,27 @@ static void __init ar913x_wmac_setup(voi
static int ar933x_wmac_reset(void)
{
Index: patches-3.3/606-MIPS-ath79-pb44-fixes.patch
===================================================================
--- patches-3.3/606-MIPS-ath79-pb44-fixes.patch (Revision 35298)
+++ patches-3.3/606-MIPS-ath79-pb44-fixes.patch (Revision 36664)
@@ -50,7 +50,7 @@
#define PB44_GPIO_SW_RESET (PB44_GPIO_EXP_BASE + 6)
#define PB44_GPIO_SW_JUMP (PB44_GPIO_EXP_BASE + 8)
#define PB44_GPIO_LED_JUMP1 (PB44_GPIO_EXP_BASE + 9)
-@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
+@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
.cs_line = 0,
};
Index: patches-3.3/521-MIPS-ath79-enable-UART-for-early_serial.patch
===================================================================
--- patches-3.3/521-MIPS-ath79-enable-UART-for-early_serial.patch (Revision 35298)
+++ patches-3.3/521-MIPS-ath79-enable-UART-for-early_serial.patch (Revision 36664)
@@ -1,6 +1,6 @@
--- a/arch/mips/ath79/early_printk.c
+++ b/arch/mips/ath79/early_printk.c
-@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
+@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
/* nothing to do */
}

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +0,0 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
@@ -44,7 +44,7 @@ static struct platform_device ath79_wmac
},
};
-static void __init ar913x_wmac_setup(void)
+static int ar913x_wmac_reset(void)
{
/* reset the WMAC */
ath79_device_reset_set(AR913X_RESET_AMBA2WMAC);
@@ -53,10 +53,19 @@ static void __init ar913x_wmac_setup(voi
ath79_device_reset_clear(AR913X_RESET_AMBA2WMAC);
mdelay(10);
+ return 0;
+}
+
+static void __init ar913x_wmac_setup(void)
+{
+ ar913x_wmac_reset();
+
ath79_wmac_resources[0].start = AR913X_WMAC_BASE;
ath79_wmac_resources[0].end = AR913X_WMAC_BASE + AR913X_WMAC_SIZE - 1;
ath79_wmac_resources[1].start = ATH79_CPU_IRQ_IP2;
ath79_wmac_resources[1].end = ATH79_CPU_IRQ_IP2;
+
+ ath79_wmac_data.external_reset = ar913x_wmac_reset;
}

View File

@ -1,81 +0,0 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
@@ -15,6 +15,7 @@
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/irq.h>
+#include <linux/etherdevice.h>
#include <linux/platform_device.h>
#include <linux/ath9k_platform.h>
@@ -22,6 +23,7 @@
#include <asm/mach-ath79/ar71xx_regs.h>
#include "dev-wmac.h"
+static u8 ath79_wmac_mac[ETH_ALEN];
static struct ath9k_platform_data ath79_wmac_data;
static struct resource ath79_wmac_resources[] = {
@@ -143,7 +145,7 @@ static void qca955x_wmac_setup(void)
ath79_wmac_data.is_clk_25mhz = true;
}
-void __init ath79_register_wmac(u8 *cal_data)
+void __init ath79_register_wmac(u8 *cal_data, u8 *mac_addr)
{
if (soc_is_ar913x())
ar913x_wmac_setup();
@@ -160,5 +162,10 @@ void __init ath79_register_wmac(u8 *cal_
memcpy(ath79_wmac_data.eeprom_data, cal_data,
sizeof(ath79_wmac_data.eeprom_data));
+ if (mac_addr) {
+ memcpy(ath79_wmac_mac, mac_addr, sizeof(ath79_wmac_mac));
+ ath79_wmac_data.macaddr = ath79_wmac_mac;
+ }
+
platform_device_register(&ath79_wmac_device);
}
--- a/arch/mips/ath79/dev-wmac.h
+++ b/arch/mips/ath79/dev-wmac.h
@@ -12,6 +12,6 @@
#ifndef _ATH79_DEV_WMAC_H
#define _ATH79_DEV_WMAC_H
-void ath79_register_wmac(u8 *cal_data);
+void ath79_register_wmac(u8 *cal_data, u8 *mac_addr);
#endif /* _ATH79_DEV_WMAC_H */
--- a/arch/mips/ath79/mach-ap81.c
+++ b/arch/mips/ath79/mach-ap81.c
@@ -98,7 +98,7 @@ static void __init ap81_setup(void)
ap81_gpio_keys);
ath79_register_spi(&ap81_spi_data, ap81_spi_info,
ARRAY_SIZE(ap81_spi_info));
- ath79_register_wmac(cal_data);
+ ath79_register_wmac(cal_data, NULL);
ath79_register_usb();
}
--- a/arch/mips/ath79/mach-db120.c
+++ b/arch/mips/ath79/mach-db120.c
@@ -134,7 +134,7 @@ static void __init db120_setup(void)
ath79_register_spi(&db120_spi_data, db120_spi_info,
ARRAY_SIZE(db120_spi_info));
ath79_register_usb();
- ath79_register_wmac(art + DB120_WMAC_CALDATA_OFFSET);
+ ath79_register_wmac(art + DB120_WMAC_CALDATA_OFFSET, NULL);
db120_pci_init(art + DB120_PCIE_CALDATA_OFFSET);
}
--- a/arch/mips/ath79/mach-ap121.c
+++ b/arch/mips/ath79/mach-ap121.c
@@ -91,7 +91,7 @@ static void __init ap121_setup(void)
ath79_register_spi(&ap121_spi_data, ap121_spi_info,
ARRAY_SIZE(ap121_spi_info));
ath79_register_usb();
- ath79_register_wmac(cal_data);
+ ath79_register_wmac(cal_data, NULL);
}
MIPS_MACHINE(ATH79_MACH_AP121, "AP121", "Atheros AP121 reference board",

View File

@ -1,47 +0,0 @@
--- a/arch/mips/ath79/common.h
+++ b/arch/mips/ath79/common.h
@@ -26,6 +26,7 @@ void ath79_ddr_wb_flush(unsigned int reg
void ath79_gpio_function_enable(u32 mask);
void ath79_gpio_function_disable(u32 mask);
void ath79_gpio_function_setup(u32 set, u32 clear);
+void ath79_gpio_output_select(unsigned gpio, u8 val);
void ath79_gpio_init(void);
#endif /* __ATH79_COMMON_H */
--- a/arch/mips/ath79/gpio.c
+++ b/arch/mips/ath79/gpio.c
@@ -198,6 +198,34 @@ void ath79_gpio_function_setup(u32 set,
spin_unlock_irqrestore(&ath79_gpio_lock, flags);
}
+void __init ath79_gpio_output_select(unsigned gpio, u8 val)
+{
+ void __iomem *base = ath79_gpio_base;
+ unsigned long flags;
+ unsigned int reg;
+ u32 t, s;
+
+ BUG_ON(!soc_is_ar934x());
+
+ if (gpio >= AR934X_GPIO_COUNT)
+ return;
+
+ reg = AR934X_GPIO_REG_OUT_FUNC0 + 4 * (gpio / 4);
+ s = 8 * (gpio % 4);
+
+ spin_lock_irqsave(&ath79_gpio_lock, flags);
+
+ t = __raw_readl(base + reg);
+ t &= ~(0xff << s);
+ t |= val << s;
+ __raw_writel(t, base + reg);
+
+ /* flush write */
+ (void) __raw_readl(base + reg);
+
+ spin_unlock_irqrestore(&ath79_gpio_lock, flags);
+}
+
void __init ath79_gpio_init(void)
{
int err;

View File

@ -1,61 +0,0 @@
--- a/arch/mips/ath79/early_printk.c
+++ b/arch/mips/ath79/early_printk.c
@@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
/* nothing to do */
}
+static void prom_enable_uart(u32 id)
+{
+ void __iomem *gpio_base;
+ u32 uart_en;
+ u32 t;
+
+ switch (id) {
+ case REV_ID_MAJOR_AR71XX:
+ uart_en = AR71XX_GPIO_FUNC_UART_EN;
+ break;
+
+ case REV_ID_MAJOR_AR7240:
+ case REV_ID_MAJOR_AR7241:
+ case REV_ID_MAJOR_AR7242:
+ uart_en = AR724X_GPIO_FUNC_UART_EN;
+ break;
+
+ case REV_ID_MAJOR_AR913X:
+ uart_en = AR913X_GPIO_FUNC_UART_EN;
+ break;
+
+ case REV_ID_MAJOR_AR9330:
+ case REV_ID_MAJOR_AR9331:
+ uart_en = AR933X_GPIO_FUNC_UART_EN;
+ break;
+
+ case REV_ID_MAJOR_AR9341:
+ case REV_ID_MAJOR_AR9342:
+ case REV_ID_MAJOR_AR9344:
+ /* TODO */
+ default:
+ return;
+ }
+
+ gpio_base = (void __iomem *)(KSEG1ADDR(AR71XX_GPIO_BASE));
+ t = __raw_readl(gpio_base + AR71XX_GPIO_REG_FUNC);
+ t |= uart_en;
+ __raw_writel(t, gpio_base + AR71XX_GPIO_REG_FUNC);
+}
+
static void prom_putchar_init(void)
{
void __iomem *base;
@@ -85,8 +125,10 @@ static void prom_putchar_init(void)
default:
_prom_putchar = prom_putchar_dummy;
- break;
+ return;
}
+
+ prom_enable_uart(id);
}
void prom_putchar(unsigned char ch)

View File

@ -1,153 +0,0 @@
--- a/arch/mips/ath79/mach-pb44.c
+++ b/arch/mips/ath79/mach-pb44.c
@@ -8,23 +8,48 @@
* by the Free Software Foundation.
*/
+#include <linux/delay.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/i2c-gpio.h>
#include <linux/i2c/pcf857x.h>
+#include <linux/i2c/pcf857x.h>
+#include <linux/spi/flash.h>
+#include <linux/spi/vsc7385.h>
-#include "machtypes.h"
+#include <asm/mach-ath79/ar71xx_regs.h>
+#include <asm/mach-ath79/ath79.h>
+
+#include "dev-eth.h"
#include "dev-gpio-buttons.h"
#include "dev-leds-gpio.h"
#include "dev-spi.h"
#include "dev-usb.h"
+#include "machtypes.h"
#include "pci.h"
#define PB44_GPIO_I2C_SCL 0
#define PB44_GPIO_I2C_SDA 1
+#define PB44_PCF8757_VSC7395_CS 0
+#define PB44_PCF8757_STEREO_CS 1
+#define PB44_PCF8757_SLIC_CS0 2
+#define PB44_PCF8757_SLIC_TEST 3
+#define PB44_PCF8757_SLIC_INT0 4
+#define PB44_PCF8757_SLIC_INT1 5
+#define PB44_PCF8757_SW_RESET 6
+#define PB44_PCF8757_SW_JUMP 8
+#define PB44_PCF8757_LED_JUMP1 9
+#define PB44_PCF8757_LED_JUMP2 10
+#define PB44_PCF8757_TP24 11
+#define PB44_PCF8757_TP25 12
+#define PB44_PCF8757_TP26 13
+#define PB44_PCF8757_TP27 14
+#define PB44_PCF8757_TP28 15
+
#define PB44_GPIO_EXP_BASE 16
+#define PB44_GPIO_VSC7395_CS (PB44_GPIO_EXP_BASE + PB44_PCF8757_VSC7395_CS)
#define PB44_GPIO_SW_RESET (PB44_GPIO_EXP_BASE + 6)
#define PB44_GPIO_SW_JUMP (PB44_GPIO_EXP_BASE + 8)
#define PB44_GPIO_LED_JUMP1 (PB44_GPIO_EXP_BASE + 9)
@@ -92,21 +117,66 @@ static struct ath79_spi_controller_data
.cs_line = 0,
};
+static struct ath79_spi_controller_data pb44_spi1_data = {
+ .cs_type = ATH79_SPI_CS_TYPE_GPIO,
+ .cs_line = PB44_GPIO_VSC7395_CS,
+};
+
+static void pb44_vsc7395_reset(void)
+{
+ ath79_device_reset_set(AR71XX_RESET_GE1_PHY);
+ udelay(10);
+ ath79_device_reset_clear(AR71XX_RESET_GE1_PHY);
+ mdelay(50);
+}
+
+static struct vsc7385_platform_data pb44_vsc7395_data = {
+ .reset = pb44_vsc7395_reset,
+ .ucode_name = "vsc7395_ucode_pb44.bin",
+ .mac_cfg = {
+ .tx_ipg = 6,
+ .bit2 = 1,
+ .clk_sel = 0,
+ },
+};
+
+static const char *pb44_part_probes[] = {
+ "RedBoot",
+ NULL,
+};
+
+static struct flash_platform_data pb44_flash_data = {
+ .part_probes = pb44_part_probes,
+};
+
static struct spi_board_info pb44_spi_info[] = {
{
.bus_num = 0,
.chip_select = 0,
.max_speed_hz = 25000000,
.modalias = "m25p64",
+ .platform_data = &pb44_flash_data,
.controller_data = &pb44_spi0_data,
},
+ {
+ .bus_num = 0,
+ .chip_select = 1,
+ .max_speed_hz = 25000000,
+ .modalias = "spi-vsc7385",
+ .platform_data = &pb44_vsc7395_data,
+ .controller_data = &pb44_spi1_data,
+ }
};
static struct ath79_spi_platform_data pb44_spi_data = {
.bus_num = 0,
- .num_chipselect = 1,
+ .num_chipselect = 2,
};
+#define PB44_WAN_PHYMASK BIT(0)
+#define PB44_LAN_PHYMASK 0
+#define PB44_MDIO_PHYMASK (PB44_LAN_PHYMASK | PB44_WAN_PHYMASK)
+
static void __init pb44_init(void)
{
i2c_register_board_info(0, pb44_i2c_board_info,
@@ -122,6 +192,22 @@ static void __init pb44_init(void)
ARRAY_SIZE(pb44_spi_info));
ath79_register_usb();
ath79_register_pci();
+
+ ath79_register_mdio(0, ~PB44_MDIO_PHYMASK);
+
+ ath79_init_mac(ath79_eth0_data.mac_addr, ath79_mac_base, 0);
+ ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ath79_eth0_data.phy_mask = PB44_WAN_PHYMASK;
+
+ ath79_register_eth(0);
+
+ ath79_init_mac(ath79_eth1_data.mac_addr, ath79_mac_base, 1);
+ ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
+ ath79_eth1_data.speed = SPEED_1000;
+ ath79_eth1_data.duplex = DUPLEX_FULL;
+ ath79_eth1_pll_data.pll_1000 = 0x110000;
+
+ ath79_register_eth(1);
}
MIPS_MACHINE(ATH79_MACH_PB44, "PB44", "Atheros PB44 reference board",
--- a/arch/mips/ath79/Kconfig
+++ b/arch/mips/ath79/Kconfig
@@ -58,6 +58,7 @@ config ATH79_MACH_DB120
config ATH79_MACH_PB44
bool "Atheros PB44 reference board"
select SOC_AR71XX
+ select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
select ATH79_DEV_LEDS_GPIO
select ATH79_DEV_SPI

View File

@ -1,166 +0,0 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
@@ -148,6 +148,137 @@ static void qca955x_wmac_setup(void)
ath79_wmac_data.is_clk_25mhz = true;
}
+static bool __init
+ar93xx_wmac_otp_read_word(void __iomem *base, int addr, u32 *data)
+{
+ int timeout = 1000;
+ u32 val;
+
+ __raw_readl(base + AR9300_OTP_BASE + (4 * addr));
+ while (timeout--) {
+ val = __raw_readl(base + AR9300_OTP_STATUS);
+ if ((val & AR9300_OTP_STATUS_TYPE) == AR9300_OTP_STATUS_VALID)
+ break;
+
+ udelay(10);
+ }
+
+ if (!timeout)
+ return false;
+
+ *data = __raw_readl(base + AR9300_OTP_READ_DATA);
+ return true;
+}
+
+static bool __init
+ar93xx_wmac_otp_read(void __iomem *base, int addr, u8 *dest, int len)
+{
+ u32 data;
+ int i;
+
+ for (i = 0; i < len; i++) {
+ int offset = 8 * ((addr - i) % 4);
+
+ if (!ar93xx_wmac_otp_read_word(base, (addr - i) / 4, &data))
+ return false;
+
+ dest[i] = (data >> offset) & 0xff;
+ }
+
+ return true;
+}
+
+static bool __init
+ar93xx_wmac_otp_uncompress(void __iomem *base, int addr, int len, u8 *dest,
+ int dest_start, int dest_len)
+{
+ int dest_bytes = 0;
+ int offset = 0;
+ int end = addr - len;
+ u8 hdr[2];
+
+ while (addr > end) {
+ if (!ar93xx_wmac_otp_read(base, addr, hdr, 2))
+ return false;
+
+ addr -= 2;
+ offset += hdr[0];
+
+ if (offset <= dest_start + dest_len &&
+ offset + len >= dest_start) {
+ int data_offset = 0;
+ int dest_offset = 0;
+ int copy_len;
+
+ if (offset < dest_start)
+ data_offset = dest_start - offset;
+ else
+ dest_offset = offset - dest_start;
+
+ copy_len = len - data_offset;
+ if (copy_len > dest_len - dest_offset)
+ copy_len = dest_len - dest_offset;
+
+ ar93xx_wmac_otp_read(base, addr - data_offset,
+ dest + dest_offset,
+ copy_len);
+
+ dest_bytes += copy_len;
+ }
+ addr -= hdr[1];
+ }
+ return !!dest_bytes;
+}
+
+bool __init ar93xx_wmac_read_mac_address(u8 *dest)
+{
+ void __iomem *base;
+ bool ret = false;
+ int addr = 0x1ff;
+ unsigned int len;
+ u32 hdr_u32;
+ u8 *hdr = (u8 *) &hdr_u32;
+ u8 mac[6] = { 0x00, 0x02, 0x03, 0x04, 0x05, 0x06 };
+ int mac_start = 2, mac_end = 8;
+
+ BUG_ON(!soc_is_ar933x() && !soc_is_ar934x());
+ base = ioremap_nocache(AR933X_WMAC_BASE, AR933X_WMAC_SIZE);
+ while (addr > sizeof(hdr)) {
+ if (!ar93xx_wmac_otp_read(base, addr, hdr, sizeof(hdr)))
+ break;
+
+ if (hdr_u32 == 0 || hdr_u32 == ~0)
+ break;
+
+ len = (hdr[1] << 4) | (hdr[2] >> 4);
+ addr -= 4;
+
+ switch (hdr[0] >> 5) {
+ case 0:
+ if (len < mac_end)
+ break;
+
+ ar93xx_wmac_otp_read(base, addr - mac_start, mac, 6);
+ ret = true;
+ break;
+ case 3:
+ ret |= ar93xx_wmac_otp_uncompress(base, addr, len, mac,
+ mac_start, 6);
+ break;
+ default:
+ break;
+ }
+
+ addr -= len + 2;
+ }
+
+ iounmap(base);
+ if (ret)
+ memcpy(dest, mac, 6);
+
+ return ret;
+}
+
void __init ath79_register_wmac(u8 *cal_data, u8 *mac_addr)
{
if (soc_is_ar913x())
--- a/arch/mips/ath79/dev-wmac.h
+++ b/arch/mips/ath79/dev-wmac.h
@@ -13,5 +13,6 @@
#define _ATH79_DEV_WMAC_H
void ath79_register_wmac(u8 *cal_data, u8 *mac_addr);
+bool ar93xx_wmac_read_mac_address(u8 *dest);
#endif /* _ATH79_DEV_WMAC_H */
--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
@@ -129,6 +129,14 @@
#define QCA955X_NFC_BASE 0x1b000200
#define QCA955X_NFC_SIZE 0xb8
+#define AR9300_OTP_BASE 0x14000
+#define AR9300_OTP_STATUS 0x15f18
+#define AR9300_OTP_STATUS_TYPE 0x7
+#define AR9300_OTP_STATUS_VALID 0x4
+#define AR9300_OTP_STATUS_ACCESS_BUSY 0x2
+#define AR9300_OTP_STATUS_SM_BUSY 0x1
+#define AR9300_OTP_READ_DATA 0x15f1c
+
/*
* DDR_CTRL block
*/

View File

@ -1,31 +0,0 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
@@ -279,6 +279,16 @@ bool __init ar93xx_wmac_read_mac_address
return ret;
}
+void __init ath79_wmac_disable_2ghz(void)
+{
+ ath79_wmac_data.disable_2ghz = true;
+}
+
+void __init ath79_wmac_disable_5ghz(void)
+{
+ ath79_wmac_data.disable_5ghz = true;
+}
+
void __init ath79_register_wmac(u8 *cal_data, u8 *mac_addr)
{
if (soc_is_ar913x())
--- a/arch/mips/ath79/dev-wmac.h
+++ b/arch/mips/ath79/dev-wmac.h
@@ -13,6 +13,9 @@
#define _ATH79_DEV_WMAC_H
void ath79_register_wmac(u8 *cal_data, u8 *mac_addr);
+void ath79_wmac_disable_2ghz(void);
+void ath79_wmac_disable_5ghz(void);
+
bool ar93xx_wmac_read_mac_address(u8 *dest);
#endif /* _ATH79_DEV_WMAC_H */

View File

@ -1,31 +0,0 @@
--- a/arch/mips/ath79/dev-wmac.c
+++ b/arch/mips/ath79/dev-wmac.c
@@ -76,10 +76,27 @@ static void __init ar913x_wmac_setup(voi
static int ar933x_wmac_reset(void)
{
+ int retries = 20;
+
ath79_device_reset_set(AR933X_RESET_WMAC);
ath79_device_reset_clear(AR933X_RESET_WMAC);
- return 0;
+ while (1) {
+ u32 bootstrap;
+
+ bootstrap = ath79_reset_rr(AR933X_RESET_REG_BOOTSTRAP);
+ if ((bootstrap & AR933X_BOOTSTRAP_EEPBUSY) == 0)
+ return 0;
+
+ if (retries-- == 0)
+ break;
+
+ udelay(10000);
+ retries++;
+ }
+
+ pr_err("ar933x: WMAC reset timed out");
+ return -ETIMEDOUT;
}
static int ar933x_r1_get_wmac_revision(void)

View File

@ -2,18 +2,72 @@
builddir=./build
prepare() {
test -d $builddir || mkdir $builddir
OPENWRTREV=35298
OPENWRTURL=svn://svn.openwrt.org/openwrt/branches/attitude_adjustment
PACKAGEREV=${OPENWRTREV}
PACKAGEURL=svn://svn.openwrt.org/openwrt/packages
get_source() {
cd src
#Get the OpenWrt Core Source for Firmware
svn checkout -r 35298 svn://svn.openwrt.org/openwrt/branches/attitude_adjustment/ $target
if [ -d openwrt ]; then
url=$(svn info openwrt | awk '/^URL/ { print $2 }')
if [ "$url" = "$OPENWRTURL" ]; then
rev=$(svn info openwrt | awk '/^Revision:/ { print $2 }')
if [ "$rev" -ne "$OPENWRTREV" ]; then
svn update -r $OPENWRTREV openwrt
fi
else
/bin/rm -rf openwrt
svn checkout -r $OPENWRTREV $OPENWRTURL openwrt
fi
else
svn checkout -r $OPENWRTREV $OPENWRTURL openwrt
fi
test -d packages || mkdir packages
cd packages
if [ -d openwrt ]; then
url=$(svn info openwrt | awk '/^URL/ { print $2 }')
if [ "$url" = "$PACKAGEURL" ]; then
rev=$(svn info openwrt | awk '/^Revision:/ { print $2 }')
if [ "$rev" -ne "$PACKAGEREV" ]; then
svn update -r $PACKAGEREV openwrt
fi
else
/bin/rm -rf openwrt
svn checkout -r $PACKAGEREV $PACKAGEURL openwrt
fi
else
svn checkout -r $PACKAGEREV $PACKAGEURL openwrt
fi
test -d routing || git clone https://github.com/openwrt-routing/packages.git routing
git --git-dir=routing/.git --work-tree=routing/ checkout 072ba90ce4b126e84d3e1734ba8e9d4beab48f03
test -d fastd || git clone git://git.metameute.de/lff/pkg_fastd fastd
git --git-dir=fastd/.git --work-tree=fastd/ checkout v10
cd .. # packages
cd .. # src
}
prepare() {
get_source
test -d $builddir || mkdir $builddir
/bin/rm -rf $target
svn export src/openwrt $target
#apply own feeds.conf
sed -e"s|PATH|$(pwd)/src/packages|g" ./build_patches/feeds.conf > $target/feeds.conf
# overwrite feeds (from r38172) to support commit ids in feeds.conf
cp ./build_patches/openwrt/feeds $target/scripts/feeds
#apply own feeds.conf
cp ./build_patches/feeds.conf $target/feeds.conf
test -d $target/feeds && /bin/rm -rf $target/feeds
$target/scripts/feeds update
@ -21,7 +75,7 @@ prepare() {
$target/scripts/feeds install -p packagesol nodewatcher
$target/scripts/feeds install -p fastd fastd libuecc
$target/scripts/feeds install -p routing alfred kmod-batman-adv kmod-batgat
$target/scripts/feeds install -p packages bridge ethtool gpioctl-sysfs horst libugpio mii-tool wavemon kmod-gpiotoggling
$target/scripts/feeds install -p openwrt bridge ethtool gpioctl-sysfs horst libugpio mii-tool wavemon kmod-gpiotoggling
#fix for building toolchain on texinfo>=5
cp -a build_patches/toolchain $target
@ -41,17 +95,17 @@ prepare() {
mv $target/package/aa-mac80211/mac80211 $target/package/mac80211
mv $target/package/aa-mac80211/hostapd $target/package/hostapd
svn up -r 37378 $target/target/linux/generic/files/include/linux/ath9k_platform.h
#backport the latests kernel fixes (needed for newer batman)
svn up -r 37768 $target/target/linux/generic/patches-3.3
#svn diff -r 35298:37768 svn://svn.openwrt.org/openwrt/branches/attitude_adjustment/target/linux/generic > build_patches/kernel_37768.patch
cat build_patches/kernel_generic_37768.patch | patch -p0 -d $target/target/linux/generic
#backport kernelpatches from openwrt r36664
cp build_patches/linux/ar71xx/patches-3.3/* $target/target/linux/ar71xx/patches-3.3
#svn diff -r 35298:36664 svn://svn.openwrt.org/openwrt/branches/attitude_adjustment/target/linux/ar71xx > build_patches/kernel_ar71xx_36664.patch
cat build_patches/kernel_ar71xx_36664.patch | patch -p0 -d $target/target/linux/ar71xx
#saves ~200MB for each build
test -d ./dl || mkdir ./dl
ln -s ../../dl $target/dl
test -d ./src/dl || mkdir ./src/dl
ln -s ../../src/dl $target/dl
board_prepare
}
@ -78,8 +132,8 @@ prebuild() {
echo "FIRMWARE_VERSION=\"$version\"" > $target/files/etc/firmware_release
echo "RELEASE_DATE=\"build date: "`date`"\"" >> $target/files/etc/firmware_release
echo "FIRMWARE_REVISION=\"build date: "`date`"\"" >> $target/files/etc/firmware_release
echo "OPENWRT_CORE_REVISION=\""`svn info $target |grep Revision: |cut -c11-`"\"" >> $target/files/etc/firmware_release
echo "OPENWRT_FEEDS_PACKAGES_REVISION=\""`svn info $target/feeds/packages |grep Revision: |cut -c11-`"\"" >> $target/files/etc/firmware_release
echo "OPENWRT_CORE_REVISION=\""${OPENWRTREV}"\"" >> $target/files/etc/firmware_release
echo "OPENWRT_FEEDS_PACKAGES_REVISION=\""${PACKAGEREV}"\"" >> $target/files/etc/firmware_release
}
build() {

View File

@ -0,0 +1,47 @@
#
# Copyright (C) 2012 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ath9k-watchdog
PKG_VERSION:=1
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/ath9k-watchdog
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Watchdog for ath9k-outages
endef
define Package/ath9k-watchdog/description
If pattern "ResetWLAN" is seen in the logs, wifi reset is executed
endef
define Package/ath9k-watchdog/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) files/ath9k-watchdog $(1)/usr/sbin/
$(INSTALL_BIN) files/ath9k-watchdog-pm $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) files/ath9k-watchdog.init $(1)/etc/init.d/ath9k-watchdog
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
$(eval $(call BuildPackage,ath9k-watchdog))

View File

@ -0,0 +1,31 @@
#!/bin/sh
mkdir -p /usr/lib/ath9k-watchdog
logread -f | while read line
do
case "$line" in
*"Could not stop RX"*)
hostname=$(cat /proc/sys/kernel/hostname)
if [ "$hostname" == "OpenWrt" ]; then
hostname=""
fi
if [ "$hostname" == "" ]; then
hostname=$(awk '{ if (mac) next; mac=toupper($1); gsub(":", "", mac); print mac }' /sys/class/net/br-mesh/address /sys/class/net/eth0/address /sys/class/net/ath0/address 2>/dev/null)
fi
# Perform post-mortem dump
tstmp=$(/bin/date +%s)
echo -n "data[hostname]=${hostname}&data[tstmp]=${tstmp}" > /tmp/$tstmp
# Move into upload directory
mv /tmp/$tstmp /usr/lib/ath9k-watchdog
#Bye
/sbin/reboot
;;
*)
;;
esac
done

View File

@ -0,0 +1,25 @@
#!/bin/sh
# Save log
mkdir -p /usr/lib/ath9k-watchdog
WGETC=$(which wget)
# CD to avoid annoying prefixes
cd /usr/lib/ath9k-watchdog
#Poll directory every 60 secs
while [ 1 = 1 ]
do
if [ "$(ls .)" != "" ]
then
UPLOAD_URL="http://[$(uci get configurator.@api[0].ipv6_address)%$(uci get configurator.@api[0].ipv6_interface)]/api/rest/event/"
for f in $(ls .); do
$WGETC -q $UPLOAD_URL"?api_key=$(uci get configurator.@api[0].api_key)&object=router&object_id="$(uci get configurator.@crawl[0].router_id)"&action=watchdog_ath9k_bug&"$(cat $f) -O - && rm $f
done
# If there are more than 15 files, assume that files cannot be uploaded
# Delete oldest files in order to avoid jffs-overflow
ls -t | sed -e '1,15d' | xargs rm 2> /dev/null
fi
sleep 60
done

View File

@ -0,0 +1,28 @@
#!/bin/sh /etc/rc.common
START=95
APP=ath9k-watchdog
POSTM=ath9k-watchdog-pm
PID_FILE=/var/run/$APP.pid
POSTM_PID_FILE=/var/run/$POSTM.pid
start() {
if [ -f $PID_FILE ]; then
echo "Ath9k-watchdog: Already Running"
else
start-stop-daemon -S -x $APP -p $PID_FILE -m -b
fi
if [ -f $POSTM_PID_FILE ]; then
echo "ath9k-watchdog-pm: Already Running"
else
start-stop-daemon -S -x $POSTM -p $POSTM_PID_FILE -m -b
fi
}
stop() {
start-stop-daemon -K -n $APP -p $PID_FILE -s TERM
start-stop-daemon -K -n $POSTM -p $POSTM_PID_FILE -s TERM
rm -rf $PID_FILE
rm -rf $POSTM_PID_FILE
}

View File

@ -0,0 +1,51 @@
#
# 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
PKG_NAME:=libwlocate
PKG_VERSION:=1.1
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dev.freifunk-ol.de/packages
PKG_MD5SUM:=5f8be7c6e95b64f24dd8cde4557612a4
include $(INCLUDE_DIR)/package.mk
define Package/libwlocate
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Shared library that can be used for location-based services
URL:=http://sourceforge.net/projects/libwlocate/
DEPENDS:=+libiw
endef
define Package/libwlocate/description
libwlocate is a shared library that can be used for location-based services.
It checks for WLAN-networks that are available near to a user and retrieves the
current geographic position out of them.
Thus no GPS is needed for positioning. This WLAN-based geolocation happens
without using any of the commercial services that do the same but track the users
position and data. libwlocate instead bases on the free OpenWLANMap project.
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_BUILD_DIR)/libwlocate.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwlocate.so $(1)/usr/lib/
endef
define Package/libwlocate/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwlocate.so $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libwlocate))

View File

@ -0,0 +1,48 @@
#
# 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
PKG_NAME:=lwtrace
PKG_VERSION:=1.1
PKG_RELEASE:=1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://dev.freifunk-ol.de/packages
PKG_MD5SUM:=bbe4e339daf69efe0b6c325f799c3e0b
include $(INCLUDE_DIR)/package.mk
define Package/lwtrace
SECTION:=utilities
CATEGORY:=Utilities
TITLE:=Tool that uses the libwlocate library to get a position wireless
URL:=http://sourceforge.net/projects/libwlocate/
DEPENDS:=+libwlocate
endef
define Package/lwtrace/description
libwlocate is a shared library that can be used for location-based services.
It checks for WLAN-networks that are available near to a user and retrieves the
current geographic position out of them.
Thus no GPS is needed for positioning. This WLAN-based geolocation happens
without using any of the commercial services that do the same but track the users
position and data. libwlocate instead bases on the free OpenWLANMap project.
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/lwtrace $(1)/usr/bin/
endef
define Package/lwtrace/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/lwtrace $(1)/usr/bin/
endef
$(eval $(call BuildPackage,lwtrace))

View File

@ -0,0 +1,40 @@
#
# 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
PKG_NAME:=nodewatcher
PKG_VERSION:=2013-02-13
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://freifunk-ol.de/ffol/software/nodewatcher.git
PKG_SOURCE:=$(PKG_NAME).tar.gz
PKG_SOURCE_VERSION:=HEAD
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/nodewatcher
SECTION:=utilities
CATEGORY:=Utilities
TITLE:=Freifunk Oldenburg Nodewatcher
URL:=http://freifunk-ol.de
DEPENDS:=+libuci +ip +libiw
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/nodewatcher $(1)/usr/bin/
endef
define Package/nodewatcher/install
$(INSTALL_DIR) $(1)/usr/bin
$(CP) $(PKG_BUILD_DIR)/nodewatcher $(1)/usr/bin/
endef
$(eval $(call BuildPackage,nodewatcher))