From 78d58a41fbbf75cc4c9bf560792d6a00947f6d24 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 16 Dec 2017 21:36:12 +0100 Subject: [PATCH 001/146] ar71xx: war: spi-nor: force-disable 4-byte mode only support flash chips up to 16mb and truncate larger chips instead of attempting to switch to 4-byte addressing mode which doesn't work on QCA SPI hardware nor the rom loader. --- .../999-hack-spi-nor-disable-4byte-mode.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.9/999-hack-spi-nor-disable-4byte-mode.patch diff --git a/target/linux/ar71xx/patches-4.9/999-hack-spi-nor-disable-4byte-mode.patch b/target/linux/ar71xx/patches-4.9/999-hack-spi-nor-disable-4byte-mode.patch new file mode 100644 index 00000000000000..f1c0da798bd55b --- /dev/null +++ b/target/linux/ar71xx/patches-4.9/999-hack-spi-nor-disable-4byte-mode.patch @@ -0,0 +1,38 @@ +Index: linux-4.9.67/drivers/mtd/spi-nor/spi-nor.c +=================================================================== +--- linux-4.9.67.orig/drivers/mtd/spi-nor/spi-nor.c ++++ linux-4.9.67/drivers/mtd/spi-nor/spi-nor.c +@@ -1151,7 +1151,10 @@ static const struct flash_info spi_nor_i + { "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) }, + { "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) }, + { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) }, +- { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512, SECT_4K) }, ++ { "w25q256", INFO(0xef4019, 0, 64 * 1024, 256, ++ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | ++ SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) ++ }, + + /* Catalyst / On Semiconductor -- non-JEDEC */ + { "cat25c11", CAT25_INFO( 16, 8, 16, 1, SPI_NOR_NO_ERASE | SPI_NOR_NO_FR) }, +@@ -1711,20 +1714,7 @@ int spi_nor_scan(struct spi_nor *nor, co + } + + nor->program_opcode = SPINOR_OP_PP; +- +- if (info->addr_width) +- nor->addr_width = info->addr_width; +- else if (mtd->size > 0x1000000) { +- /* enable 4-byte addressing if the device exceeds 16MiB */ +- nor->addr_width = 4; +- if (JEDEC_MFR(info) == SNOR_MFR_SPANSION || +- info->flags & SPI_NOR_4B_OPCODES) +- spi_nor_set_4byte_opcodes(nor, info); +- else +- set_4byte(nor, info, 1); +- } else { +- nor->addr_width = 3; +- } ++ nor->addr_width = 3; + + if (nor->addr_width > SPI_NOR_MAX_ADDR_WIDTH) { + dev_err(dev, "address width is too large: %u\n", From 11ad5b96a4af5c750da6df44f8bdb26eb0ac452e Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 15 Dec 2017 21:22:07 +0100 Subject: [PATCH 002/146] ar71xx: add support for LibreRouter v1 Based on 6325eeec2d72a4b14883c46b8423ba8580cbd2e6 by Daniel Golle --- .../ar71xx/base-files/etc/board.d/02_network | 5 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.9 | 1 + .../files/arch/mips/ath79/Kconfig.openwrt | 10 + .../ar71xx/files/arch/mips/ath79/Makefile | 1 + .../arch/mips/ath79/mach-librerouter-v1.c | 209 ++++++++++++++++++ .../ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/generic.mk | 11 + 9 files changed, 242 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index b0076366bc505d..800d946dd62b91 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -447,6 +447,11 @@ ar71xx_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "5:wan" "6@eth1" ;; + librerouter-v1) + ucidef_set_interfaces_lan_wan "eth1.2" "eth0.1" + ucidef_add_switch "switch0" \ + "0@eth0" "2:wan" "6@eth1" "1:lan" "3:lan" "4:lan" + ;; nanostation-m-xw) ucidef_add_switch "switch0" \ "0@eth0" "5:lan" "1:wan" diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 3af2eee2bd5f28..02b30ee4079443 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -798,6 +798,9 @@ ar71xx_board_detect() { *"LAN Turtle") name="lan-turtle" ;; + *"LibreRouter v1"*) + name="librerouter-v1" + ;; *"Lima"*) name="lima" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index ca1270b7fdc84c..242c30906b23f1 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -274,6 +274,7 @@ platform_check_image() { hornet-ub-x2|\ jwap230|\ lbe-m5|\ + librerouter-v1|\ lima|\ loco-m-xw|\ mzk-w04nu|\ diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 index 8aa0b41ae961d2..7f2689688e71c8 100644 --- a/target/linux/ar71xx/config-4.9 +++ b/target/linux/ar71xx/config-4.9 @@ -138,6 +138,7 @@ CONFIG_ATH79=y # CONFIG_ATH79_MACH_JWAP230 is not set # CONFIG_ATH79_MACH_KOALA is not set # CONFIG_ATH79_MACH_LAN_TURTLE is not set +# CONFIG_ATH79_MACH_LIBREROUTERV1 is not set # CONFIG_ATH79_MACH_LIMA is not set # CONFIG_ATH79_MACH_MC_MAC1200R is not set # CONFIG_ATH79_MACH_MR12 is not set diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index e7655b3c026ca8..bcf1657fed58cc 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1012,6 +1012,16 @@ config ATH79_MACH_WIFI_PINEAPPLE_NANO select ATH79_DEV_USB select ATH79_DEV_WMAC +config ATH79_MACH_LIBREROUTERV1 + bool "LibreRouter v1 board support" + select SOC_QCA955X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + select ATH79_DEV_WMAC + config ATH79_MACH_WRT160NL bool "Linksys WRT160NL board support" select SOC_AR913X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 8800a7de102006..e6a83fd981804a 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -149,6 +149,7 @@ obj-$(CONFIG_ATH79_MACH_JWAP003) += mach-jwap003.o obj-$(CONFIG_ATH79_MACH_JWAP230) += mach-jwap230.o obj-$(CONFIG_ATH79_MACH_KOALA) += mach-koala.o obj-$(CONFIG_ATH79_MACH_LAN_TURTLE) += mach-lan-turtle.o +obj-$(CONFIG_ATH79_MACH_LIBREROUTERV1) += mach-librerouter-v1.o obj-$(CONFIG_ATH79_MACH_LIMA) += mach-lima.o obj-$(CONFIG_ATH79_MACH_MC_MAC1200R) += mach-mc-mac1200r.o obj-$(CONFIG_ATH79_MACH_MR12) += mach-mr12.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c new file mode 100644 index 00000000000000..dfc7658ed10da1 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -0,0 +1,209 @@ +/* + * LibreRouter v1 support (based on AP135) + * + * Copyright (C) 2017 Daniel Golle + * + * Based on mach-wpj558.c and mach-tl-wr1043nd-v2.c + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-ap9x-pci.h" +#include "dev-eth.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-nfc.h" +#include "dev-spi.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" +#include "pci.h" + +#define LIBREROUTERV1_MAC0_OFFSET 0x0 +#define LIBREROUTERV1_MAC1_OFFSET 0x6 +#define LIBREROUTERV1_WMAC_CALDATA_OFFSET 0x1000 + +static struct mtd_partition librerouter_spi_partitions[] = { + { + .name = "uboot", + .offset = 0, + .size = 0x0040000, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "uboot-env", + .offset = 0x0040000, + .size = 0x0010000, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "firmware", + .offset = 0x0050000, + .size = 0x0fa0000, + }, { + .name = "art", + .offset = 0x0ff0000, + .size = 0x0010000, + .mask_flags = MTD_WRITEABLE, + } +}; + +static struct flash_platform_data librerouter_spi_flash_data = { + .parts = librerouter_spi_partitions, + .nr_parts = ARRAY_SIZE(librerouter_spi_partitions), +}; + +static struct spi_board_info librerouter_spi_info[] = { + { + .bus_num = 0, + .chip_select = 0, + .max_speed_hz = 25000000, + .modalias = "w25q256", + .platform_data = &librerouter_spi_flash_data, + }, +}; + +static struct ath79_spi_platform_data librerouter_spi_data = { + .bus_num = 0, + .num_chipselect = 1, +}; + +static const struct ar8327_led_info librerouter_leds_qca8337[] = { + AR8327_LED_INFO(PHY0_0, HW, "librerouter:green:link0"), + AR8327_LED_INFO(PHY1_0, HW, "librerouter:green:link1"), +}; + +/* Blink rate: 1 Gbps -> 8 hz, 100 Mbs -> 4 Hz, 10 Mbps -> 2 Hz */ +static struct ar8327_led_cfg librerouter_qca8337_led_cfg = { + .led_ctrl0 = 0xcf37cf37, + .led_ctrl1 = 0xcf37cf37, + .led_ctrl2 = 0xcf37cf37, + .led_ctrl3 = 0x0, + .open_drain = true, +}; + +/* QCA8337 GMAC0 is connected with QCA9558 over RGMII */ +static struct ar8327_pad_cfg librerouter_qca8337_pad0_cfg = { + .mode = AR8327_PAD_MAC_RGMII, + .txclk_delay_en = true, + .rxclk_delay_en = true, + .txclk_delay_sel = AR8327_CLK_DELAY_SEL1, + .rxclk_delay_sel = AR8327_CLK_DELAY_SEL2, + .mac06_exchange_dis = false, +}; + +/* QCA8337 GMAC6 is connected with QCA9558 over SGMII */ +static struct ar8327_pad_cfg librerouter_qca8337_pad6_cfg = { + .mode = AR8327_PAD_MAC_SGMII, + .sgmii_delay_en = true, + .rxclk_delay_sel = AR8327_CLK_DELAY_SEL0, +}; + + +static struct ar8327_platform_data librerouter_qca8337_data = { + .pad0_cfg = &librerouter_qca8337_pad0_cfg, + .pad6_cfg = &librerouter_qca8337_pad6_cfg, + .port0_cfg = { + .force_link = 1, + .speed = AR8327_PORT_SPEED_1000, + .duplex = 1, + .txpause = 1, + .rxpause = 1, + }, + .port6_cfg = { + .force_link = 1, + .speed = AR8327_PORT_SPEED_1000, + .duplex = 1, + .txpause = 1, + .rxpause = 1, + }, + .led_cfg = &librerouter_qca8337_led_cfg, + .num_leds = ARRAY_SIZE(librerouter_leds_qca8337), + .leds = librerouter_leds_qca8337, +}; + +static struct mdio_board_info librerouter_mdio0_info[] = { + { + .bus_id = "ag71xx-mdio.0", + .phy_addr = 0, + .platform_data = &librerouter_qca8337_data, + }, +}; + +static void __init librerouter_setup_qca955x_eth_cfg(u32 mask, + unsigned int rxd, + unsigned int rxdv, + unsigned int txd, + unsigned int txe) +{ + void __iomem *base; + u32 t; + + base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE); + + t = mask; + t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT; + t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT; + t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT; + t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT; + + __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG); + + iounmap(base); +} + +static void __init librerouter_v1_setup(void) +{ + u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); + + ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE); + ath79_register_spi(&librerouter_spi_data, + librerouter_spi_info, + ARRAY_SIZE(librerouter_spi_info)); + + mdiobus_register_board_info(librerouter_mdio0_info, + ARRAY_SIZE(librerouter_mdio0_info)); + ath79_register_mdio(0, 0x0); + + librerouter_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 2, 2, 0, 0); + + /* QCA9558 GMAC0 is connected to RMGII interface */ + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; + ath79_eth0_data.phy_mask = BIT(0); + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; + ath79_eth0_pll_data.pll_1000 = 0xa6000000; + + ath79_init_mac(ath79_eth0_data.mac_addr, art + LIBREROUTERV1_MAC0_OFFSET, 0); + ath79_register_eth(0); + + /* QCA9558 GMAC1 is connected to SGMII interface */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; + ath79_eth1_data.speed = SPEED_1000; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_eth1_pll_data.pll_1000 = 0x03000101; + + ath79_init_mac(ath79_eth1_data.mac_addr, art + LIBREROUTERV1_MAC1_OFFSET, 0); + + ath79_register_eth(1); + + ath79_register_wmac(art + LIBREROUTERV1_WMAC_CALDATA_OFFSET, NULL); + + ath79_register_pci(); + ath79_register_usb(); + ath79_register_nfc(); +} + +MIPS_MACHINE(ATH79_MACH_LIBREROUTERV1, "LIBREROUTERV1", "LibreRouter v1", librerouter_v1_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 390ec0b2c38d9a..37115865fdc78b 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -148,6 +148,7 @@ enum ath79_mach_type { ATH79_MACH_JWAP230, /* jjPlus JWAP230 */ ATH79_MACH_KOALA, /* OCEDO Koala */ ATH79_MACH_LAN_TURTLE, /* Hak5 LAN Turtle */ + ATH79_MACH_LIBREROUTERV1, /* LibreRouter v1 */ ATH79_MACH_LIMA, /* 8devices Lima */ ATH79_MACH_MC_MAC1200R, /* MERCURY MAC1200R */ ATH79_MACH_MR12, /* Cisco Meraki MR12 */ diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 640557532c8a02..4a9dafebfc26a9 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1388,3 +1388,14 @@ define Device/fritz450e IMAGE_SIZE := 15232k endef TARGET_DEVICES += fritz450e + +define Device/librerouter-v1 + DEVICE_TITLE := LibreRouter v1 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 + BOARDNAME := LIBREROUTERV1 + IMAGE_SIZE := 32384k + KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma + IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) +endef +TARGET_DEVICES += librerouter-v1 From 91d4c13652124fe16f6b9deb469445076d1da51b Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 4 Nov 2018 15:06:07 -0300 Subject: [PATCH 003/146] LibreRouter: use cmdline from u-boot --- target/linux/ar71xx/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 4a9dafebfc26a9..f030ed34c69b51 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1394,7 +1394,7 @@ define Device/librerouter-v1 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 BOARDNAME := LIBREROUTERV1 IMAGE_SIZE := 32384k - KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma + KERNEL := kernel-bin | lzma | uImage lzma IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) endef From 23eff4026a17a6f5f616880db81c38aa7ed1bf5a Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 15 Nov 2018 02:07:22 -0300 Subject: [PATCH 004/146] ar71xx: add secondary QCA9558 UART (UART1) to LibreRouter --- .../arch/mips/ath79/mach-librerouter-v1.c | 22 +++++++++++++++++++ ...IPS-ath79-add-qca955x-uart1-reg-defs.patch | 11 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.9/917-MIPS-ath79-add-qca955x-uart1-reg-defs.patch diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c index dfc7658ed10da1..602423a2372141 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -81,6 +81,26 @@ static struct ath79_spi_platform_data librerouter_spi_data = { .num_chipselect = 1, }; +static struct resource librerouter_uart1_resources[] = { + { + .start = QCA955X_UART1_BASE, + .end = QCA955X_UART1_BASE + QCA955X_UART1_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = ATH79_MISC_IRQ(6), + .end = ATH79_MISC_IRQ(6), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device librerouter_uart1_device = { + .name = "ar933x-uart", + .id = -1, + .resource = librerouter_uart1_resources, + .num_resources = ARRAY_SIZE(librerouter_uart1_resources), +}; + static const struct ar8327_led_info librerouter_leds_qca8337[] = { AR8327_LED_INFO(PHY0_0, HW, "librerouter:green:link0"), AR8327_LED_INFO(PHY1_0, HW, "librerouter:green:link1"), @@ -204,6 +224,8 @@ static void __init librerouter_v1_setup(void) ath79_register_pci(); ath79_register_usb(); ath79_register_nfc(); + + platform_device_register(&librerouter_uart1_device); } MIPS_MACHINE(ATH79_MACH_LIBREROUTERV1, "LIBREROUTERV1", "LibreRouter v1", librerouter_v1_setup); diff --git a/target/linux/ar71xx/patches-4.9/917-MIPS-ath79-add-qca955x-uart1-reg-defs.patch b/target/linux/ar71xx/patches-4.9/917-MIPS-ath79-add-qca955x-uart1-reg-defs.patch new file mode 100644 index 00000000000000..db19bfcbbecf57 --- /dev/null +++ b/target/linux/ar71xx/patches-4.9/917-MIPS-ath79-add-qca955x-uart1-reg-defs.patch @@ -0,0 +1,11 @@ +--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h ++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +@@ -137,6 +137,8 @@ + #define QCA955X_GMAC_SIZE 0x40 + #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) + #define QCA955X_WMAC_SIZE 0x20000 ++#define QCA955X_UART1_BASE (AR71XX_APB_BASE + 0x00500000) ++#define QCA955X_UART1_SIZE 0x14 + #define QCA955X_EHCI0_BASE 0x1b000000 + #define QCA955X_EHCI1_BASE 0x1b400000 + #define QCA955X_EHCI_SIZE 0x1000 From 3fec1a62c34fb4873f39cafbdea7c4ec98864c3e Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 20 Jan 2019 05:37:57 +0300 Subject: [PATCH 005/146] select MACH_LIBREROUTERV1 by default --- target/linux/ar71xx/config-4.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 index 7f2689688e71c8..ac45683b4900f5 100644 --- a/target/linux/ar71xx/config-4.9 +++ b/target/linux/ar71xx/config-4.9 @@ -138,7 +138,7 @@ CONFIG_ATH79=y # CONFIG_ATH79_MACH_JWAP230 is not set # CONFIG_ATH79_MACH_KOALA is not set # CONFIG_ATH79_MACH_LAN_TURTLE is not set -# CONFIG_ATH79_MACH_LIBREROUTERV1 is not set +CONFIG_ATH79_MACH_LIBREROUTERV1=y # CONFIG_ATH79_MACH_LIMA is not set # CONFIG_ATH79_MACH_MC_MAC1200R is not set # CONFIG_ATH79_MACH_MR12 is not set From 8dff4c3c4e84aa5abe7c3da83398be6b03ea83f8 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 22 Jan 2019 18:17:15 +0300 Subject: [PATCH 006/146] add .config and feeds to build LibreMesh firmware This is a only a starting point. --- configs/default_config | 128 +++++++++++++++++++++++++++++++++++++++++ feeds.conf.default | 4 ++ 2 files changed, 132 insertions(+) create mode 100644 configs/default_config diff --git a/configs/default_config b/configs/default_config new file mode 100644 index 00000000000000..8082ea21af4365 --- /dev/null +++ b/configs/default_config @@ -0,0 +1,128 @@ +CONFIG_TARGET_ar71xx=y +CONFIG_TARGET_ar71xx_generic=y +CONFIG_TARGET_ar71xx_generic_DEVICE_librerouter-v1=y +CONFIG_DEVEL=y +CONFIG_BUSYBOX_CUSTOM=y +CONFIG_BUSYBOX_CONFIG_DEVMEM=y +CONFIG_BUSYBOX_CONFIG_NC_SERVER=y +CONFIG_BWMNG_EXTENDEDSTATS=y +CONFIG_BWMNG_TIME=y +CONFIG_DOWNLOAD_FOLDER="~/openwrt_download_cache" +# CONFIG_FEED_luci is not set +# CONFIG_FEED_packages is not set +# CONFIG_FEED_routing is not set +# CONFIG_FEED_telephony is not set +CONFIG_KERNEL_DEVMEM=y +CONFIG_KMOD_BATMAN_ADV_BATMAN_V=y +CONFIG_KMOD_BATMAN_ADV_BLA=y +CONFIG_KMOD_BATMAN_ADV_DAT=y +CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y +CONFIG_KMOD_BATMAN_ADV_MCAST=y +CONFIG_PACKAGE_ALFRED_VIS=y +CONFIG_PACKAGE_alfred=y +CONFIG_PACKAGE_batctl=y +CONFIG_PACKAGE_bmx6=y +CONFIG_PACKAGE_bmx6-auto-gw-mode=y +CONFIG_PACKAGE_bmx6-json=y +CONFIG_PACKAGE_bmx6-sms=y +CONFIG_PACKAGE_bmx6-table=y +CONFIG_PACKAGE_bmx6-uci-config=y +CONFIG_PACKAGE_bwm-ng=y +# CONFIG_PACKAGE_dnsmasq is not set +CONFIG_PACKAGE_dnsmasq-dhcpv6=y +CONFIG_PACKAGE_dnsmasq-distributed-hosts=y +CONFIG_PACKAGE_dnsmasq-lease-share=y +CONFIG_PACKAGE_ebtables=y +CONFIG_PACKAGE_ethtool=y +CONFIG_PACKAGE_first-boot-wizard-daemon=y +CONFIG_PACKAGE_first-boot-wizard-gui=y +CONFIG_PACKAGE_ip-tiny=y +CONFIG_PACKAGE_iputils-ping=y +CONFIG_PACKAGE_iputils-ping6=y +CONFIG_PACKAGE_kmod-batman-adv=y +CONFIG_PACKAGE_kmod-crypto-crc32c=y +CONFIG_PACKAGE_kmod-crypto-hash=y +CONFIG_PACKAGE_kmod-dummy=y +CONFIG_PACKAGE_kmod-ebtables=y +CONFIG_PACKAGE_kmod-ebtables-ipv6=y +CONFIG_PACKAGE_kmod-ip6-tunnel=y +CONFIG_PACKAGE_kmod-iptunnel6=y +CONFIG_PACKAGE_kmod-lib-crc16=y +CONFIG_PACKAGE_kmod-lib-crc32c=y +CONFIG_PACKAGE_kmod-macvlan=y +CONFIG_PACKAGE_kmod-tun=y +CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y +CONFIG_PACKAGE_kmod-usb-ohci=y +CONFIG_PACKAGE_libiwinfo-lua=y +CONFIG_PACKAGE_liblua=y +CONFIG_PACKAGE_liblucihttp=y +CONFIG_PACKAGE_liblucihttp-lua=y +CONFIG_PACKAGE_libncurses=y +CONFIG_PACKAGE_libpcap=y +CONFIG_PACKAGE_libremap-agent=y +CONFIG_PACKAGE_librt=y +CONFIG_PACKAGE_libubox-lua=y +CONFIG_PACKAGE_libubus-lua=y +CONFIG_PACKAGE_libuci-lua=y +CONFIG_PACKAGE_lime-app=y +CONFIG_PACKAGE_lime-basic=y +CONFIG_PACKAGE_lime-debug=y +CONFIG_PACKAGE_lime-docs=y +CONFIG_PACKAGE_lime-docs-minimal=y +CONFIG_PACKAGE_lime-full=y +CONFIG_PACKAGE_lime-hwd-ground-routing=y +CONFIG_PACKAGE_lime-hwd-openwrt-wan=y +CONFIG_PACKAGE_lime-map-agent=y +CONFIG_PACKAGE_lime-proto-anygw=y +CONFIG_PACKAGE_lime-proto-batadv=y +CONFIG_PACKAGE_lime-proto-bmx6=y +CONFIG_PACKAGE_lime-proto-wan=y +CONFIG_PACKAGE_lime-system=y +CONFIG_PACKAGE_lime-webui=y +CONFIG_PACKAGE_lua=y +CONFIG_PACKAGE_luci=y +CONFIG_PACKAGE_luci-app-batman-adv=y +CONFIG_PACKAGE_luci-app-bmx6=y +CONFIG_PACKAGE_luci-app-firewall=y +CONFIG_PACKAGE_luci-app-lime-location=y +CONFIG_PACKAGE_luci-base=y +CONFIG_PACKAGE_luci-i18n-base-en=y +CONFIG_PACKAGE_luci-lib-dracula=y +CONFIG_PACKAGE_luci-lib-httpclient=y +CONFIG_PACKAGE_luci-lib-httpprotoutils=y +CONFIG_PACKAGE_luci-lib-ip=y +CONFIG_PACKAGE_luci-lib-jquery-1-4=y +CONFIG_PACKAGE_luci-lib-jquery-flot-0-8=y +CONFIG_PACKAGE_luci-lib-json=y +CONFIG_PACKAGE_luci-lib-jsonc=y +CONFIG_PACKAGE_luci-lib-libremap=y +CONFIG_PACKAGE_luci-lib-libremap-bmx6=y +CONFIG_PACKAGE_luci-lib-libremap-location=y +CONFIG_PACKAGE_luci-lib-libremap-system=y +CONFIG_PACKAGE_luci-lib-libremap-wireless=y +CONFIG_PACKAGE_luci-lib-nixio=y +CONFIG_PACKAGE_luci-mod-admin-full=y +CONFIG_PACKAGE_luci-mod-status=y +CONFIG_PACKAGE_luci-proto-ipv6=y +CONFIG_PACKAGE_luci-proto-ppp=y +CONFIG_PACKAGE_luci-theme-bootstrap=y +CONFIG_PACKAGE_mtr=y +CONFIG_PACKAGE_netperf=y +CONFIG_PACKAGE_pv=y +CONFIG_PACKAGE_rpcd=y +CONFIG_PACKAGE_rpcd-mod-rrdns=y +CONFIG_PACKAGE_safe-reboot=y +CONFIG_PACKAGE_smonit=y +CONFIG_PACKAGE_sprunge=y +CONFIG_PACKAGE_tcpdump-mini=y +CONFIG_PACKAGE_terminfo=y +CONFIG_PACKAGE_ubus-lime-batman-adv=y +CONFIG_PACKAGE_ubus-lime-bmx6=y +CONFIG_PACKAGE_ubus-lime-grondrouting=y +CONFIG_PACKAGE_ubus-lime-location=y +CONFIG_PACKAGE_ubus-lime-metrics=y +CONFIG_PACKAGE_ubus-lime-openairview=y +CONFIG_PACKAGE_ubus-lime-utils=y +CONFIG_PACKAGE_uhttpd=y +CONFIG_PACKAGE_uhttpd-mod-ubus=y +CONFIG_PACKAGE_watchping=y diff --git a/feeds.conf.default b/feeds.conf.default index 9dddc195324f6c..5a681c88c47c0d 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -2,3 +2,7 @@ src-git packages https://git.openwrt.org/feed/packages.git^35e0b737ab496f5b51e80 src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0bcdde570f2ca913 src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a7845ab2183d6acd76 src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b + +src-git libremesh https://github.com/libremesh/lime-packages.git;master +src-git libremap https://github.com/libremap/libremap-agent-openwrt.git;master +src-git fbw https://github.com/libremesh/FirstBootWizard.git;master From e01db77192815bb3f7271bc848d857e5311cf4a7 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 22 Jan 2019 18:29:17 +0300 Subject: [PATCH 007/146] add new wireless regulation specs for Vatican and Tanzania --- .../wireless-regdb/patches/900-tz.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 package/firmware/wireless-regdb/patches/900-tz.patch diff --git a/package/firmware/wireless-regdb/patches/900-tz.patch b/package/firmware/wireless-regdb/patches/900-tz.patch new file mode 100644 index 00000000000000..8b3b79f176c0c1 --- /dev/null +++ b/package/firmware/wireless-regdb/patches/900-tz.patch @@ -0,0 +1,22 @@ +--- a/db.txt ++++ b/db.txt +@@ -1209,8 +1209,8 @@ country TW: DFS-FCC + (57000 - 66000 @ 2160), (40) + + country TZ: +- (2402 - 2482 @ 40), (20) +- (5735 - 5835 @ 80), (30) ++ (2402 - 2484 @ 40), (30) ++ (5150 - 5835 @ 80), (30) + + # Source: + # #914 / 06 Sep 2007: http://www.ucrf.gov.ua/uk/doc/nkrz/1196068874 + +@@ -1334,3 +1334,7 @@ country ZW: DFS-ETSI + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + ++country VA: ++ (2402 - 2484 @ 40), (30) ++ (5150 - 5835 @ 80), (30) + From 8dba4863a660025b95e2b78b0472fb7b776648a9 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 22 Jan 2019 12:25:49 -0300 Subject: [PATCH 008/146] Disable CONFIG_DOWNLOAD_FOLDER by default CONFIG_DOWNLOAD_FOLDER is a very handy way of caching and sharing the source download. We should find a way of leting the user enable this and selecting the folder. --- configs/default_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index 8082ea21af4365..70f4bedef330d5 100644 --- a/configs/default_config +++ b/configs/default_config @@ -7,7 +7,7 @@ CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y -CONFIG_DOWNLOAD_FOLDER="~/openwrt_download_cache" +#CONFIG_DOWNLOAD_FOLDER="~/openwrt_download_cache" # CONFIG_FEED_luci is not set # CONFIG_FEED_packages is not set # CONFIG_FEED_routing is not set From e50e09ae31c80940805ec6cac670a8d227e4dd28 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 22 Jan 2019 12:36:39 -0300 Subject: [PATCH 009/146] add build instructions in README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000000000..40612ecf385b38 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ + +## Build instructions + +You need gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, +unzip, gawk, getopt, subversion, libz-dev and libc headers installed. + +1. Run `./scripts/feeds update -a` to obtain all the latest package definitions +defined in feeds.conf.default +2. Run `./scripts/feeds install -a` to install symlinks for all obtained +packages into package/feeds/ +3. Run `cp configs/default_config .config` +4. Run `make` to build your firmware. From e43451e1c93a4c929226204e2aa99e61efa17b3e Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 29 Jan 2019 23:12:45 -0300 Subject: [PATCH 010/146] uboot-envtools: add support for LibreRouter v1 Signed-off-by: Santiago Piccinini --- package/boot/uboot-envtools/files/ar71xx | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 2d9fcea1ac2f0b..e3cb0f89ac3b49 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -39,6 +39,7 @@ hornet-ub|\ hornet-ub-x2|\ jwap230|\ koala|\ +librerouter-v1|\ mr1750|\ mr1750v2|\ mr600|\ From 94e087d3ca79811e545c0a659fcf5c75d89d2159 Mon Sep 17 00:00:00 2001 From: spiccinini Date: Sat, 16 Feb 2019 15:29:52 -0300 Subject: [PATCH 011/146] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000000000..dd84ea7824f11b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. From 070c3170fc1c6e645ea40621bd2f100fd6844a30 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:14:43 -0300 Subject: [PATCH 012/146] remove commented CONFIG_DOWNLOAD_FOLDER This option is not used but generates confusion as it is different than the default diffconfig --- configs/default_config | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index 70f4bedef330d5..6afa6387774c0d 100644 --- a/configs/default_config +++ b/configs/default_config @@ -7,7 +7,6 @@ CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y -#CONFIG_DOWNLOAD_FOLDER="~/openwrt_download_cache" # CONFIG_FEED_luci is not set # CONFIG_FEED_packages is not set # CONFIG_FEED_routing is not set From 21c0a8910018da3d62f36ff40bc2883fe01b04b2 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:17:47 -0300 Subject: [PATCH 013/146] enable fft-eval from lime-packages master --- configs/default_config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configs/default_config b/configs/default_config index 6afa6387774c0d..d9606aec6cce40 100644 --- a/configs/default_config +++ b/configs/default_config @@ -12,12 +12,15 @@ CONFIG_BWMNG_TIME=y # CONFIG_FEED_routing is not set # CONFIG_FEED_telephony is not set CONFIG_KERNEL_DEVMEM=y +CONFIG_KERNEL_RELAY=y CONFIG_KMOD_BATMAN_ADV_BATMAN_V=y CONFIG_KMOD_BATMAN_ADV_BLA=y CONFIG_KMOD_BATMAN_ADV_DAT=y CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y CONFIG_KMOD_BATMAN_ADV_MCAST=y CONFIG_PACKAGE_ALFRED_VIS=y +CONFIG_PACKAGE_ATH_DEBUG=y +CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bmx6=y @@ -33,6 +36,7 @@ CONFIG_PACKAGE_dnsmasq-distributed-hosts=y CONFIG_PACKAGE_dnsmasq-lease-share=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y +CONFIG_PACKAGE_fft-eval=y CONFIG_PACKAGE_first-boot-wizard-daemon=y CONFIG_PACKAGE_first-boot-wizard-gui=y CONFIG_PACKAGE_ip-tiny=y From b01192e41c75c379e1d3d0a986313e97d586de20 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:18:46 -0300 Subject: [PATCH 014/146] deselect lime meta packages --- configs/default_config | 2 -- 1 file changed, 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index d9606aec6cce40..7e7f4574fe133e 100644 --- a/configs/default_config +++ b/configs/default_config @@ -68,11 +68,9 @@ CONFIG_PACKAGE_libubox-lua=y CONFIG_PACKAGE_libubus-lua=y CONFIG_PACKAGE_libuci-lua=y CONFIG_PACKAGE_lime-app=y -CONFIG_PACKAGE_lime-basic=y CONFIG_PACKAGE_lime-debug=y CONFIG_PACKAGE_lime-docs=y CONFIG_PACKAGE_lime-docs-minimal=y -CONFIG_PACKAGE_lime-full=y CONFIG_PACKAGE_lime-hwd-ground-routing=y CONFIG_PACKAGE_lime-hwd-openwrt-wan=y CONFIG_PACKAGE_lime-map-agent=y From 46525b36892694d118447a42e945b4df7ad09eae Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:19:52 -0300 Subject: [PATCH 015/146] do not select bm6 by default --- configs/default_config | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/configs/default_config b/configs/default_config index 7e7f4574fe133e..2ad8dfa71c1c56 100644 --- a/configs/default_config +++ b/configs/default_config @@ -23,12 +23,6 @@ CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_batctl=y -CONFIG_PACKAGE_bmx6=y -CONFIG_PACKAGE_bmx6-auto-gw-mode=y -CONFIG_PACKAGE_bmx6-json=y -CONFIG_PACKAGE_bmx6-sms=y -CONFIG_PACKAGE_bmx6-table=y -CONFIG_PACKAGE_bmx6-uci-config=y CONFIG_PACKAGE_bwm-ng=y # CONFIG_PACKAGE_dnsmasq is not set CONFIG_PACKAGE_dnsmasq-dhcpv6=y @@ -76,14 +70,12 @@ CONFIG_PACKAGE_lime-hwd-openwrt-wan=y CONFIG_PACKAGE_lime-map-agent=y CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-batadv=y -CONFIG_PACKAGE_lime-proto-bmx6=y CONFIG_PACKAGE_lime-proto-wan=y CONFIG_PACKAGE_lime-system=y CONFIG_PACKAGE_lime-webui=y CONFIG_PACKAGE_lua=y CONFIG_PACKAGE_luci=y CONFIG_PACKAGE_luci-app-batman-adv=y -CONFIG_PACKAGE_luci-app-bmx6=y CONFIG_PACKAGE_luci-app-firewall=y CONFIG_PACKAGE_luci-app-lime-location=y CONFIG_PACKAGE_luci-base=y @@ -97,7 +89,6 @@ CONFIG_PACKAGE_luci-lib-jquery-flot-0-8=y CONFIG_PACKAGE_luci-lib-json=y CONFIG_PACKAGE_luci-lib-jsonc=y CONFIG_PACKAGE_luci-lib-libremap=y -CONFIG_PACKAGE_luci-lib-libremap-bmx6=y CONFIG_PACKAGE_luci-lib-libremap-location=y CONFIG_PACKAGE_luci-lib-libremap-system=y CONFIG_PACKAGE_luci-lib-libremap-wireless=y @@ -118,7 +109,6 @@ CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y CONFIG_PACKAGE_ubus-lime-batman-adv=y -CONFIG_PACKAGE_ubus-lime-bmx6=y CONFIG_PACKAGE_ubus-lime-grondrouting=y CONFIG_PACKAGE_ubus-lime-location=y CONFIG_PACKAGE_ubus-lime-metrics=y From af9e49a1304142174eae2629be99089d253c3ecf Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:21:32 -0300 Subject: [PATCH 016/146] deselect lime-webui --- configs/default_config | 2 -- 1 file changed, 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index 2ad8dfa71c1c56..6b018f3173c787 100644 --- a/configs/default_config +++ b/configs/default_config @@ -72,14 +72,12 @@ CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y CONFIG_PACKAGE_lime-system=y -CONFIG_PACKAGE_lime-webui=y CONFIG_PACKAGE_lua=y CONFIG_PACKAGE_luci=y CONFIG_PACKAGE_luci-app-batman-adv=y CONFIG_PACKAGE_luci-app-firewall=y CONFIG_PACKAGE_luci-app-lime-location=y CONFIG_PACKAGE_luci-base=y -CONFIG_PACKAGE_luci-i18n-base-en=y CONFIG_PACKAGE_luci-lib-dracula=y CONFIG_PACKAGE_luci-lib-httpclient=y CONFIG_PACKAGE_luci-lib-httpprotoutils=y From 9b8a7385facf49fac6b6029ec01296fd32ae34dd Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:27:38 -0300 Subject: [PATCH 017/146] disable all CONFIG_FEED_* for the moment --- configs/default_config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/default_config b/configs/default_config index 6b018f3173c787..7941293898e046 100644 --- a/configs/default_config +++ b/configs/default_config @@ -7,6 +7,9 @@ CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y +# CONFIG_FEED_fbw is not set +# CONFIG_FEED_libremap is not set +# CONFIG_FEED_libremesh is not set # CONFIG_FEED_luci is not set # CONFIG_FEED_packages is not set # CONFIG_FEED_routing is not set From 9ca827c4911277d92de4c419268cc71f0e5aa9b7 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 18:16:06 -0300 Subject: [PATCH 018/146] deselect lime-map-agent --- configs/default_config | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index 7941293898e046..cfbe90c561f4f1 100644 --- a/configs/default_config +++ b/configs/default_config @@ -70,7 +70,6 @@ CONFIG_PACKAGE_lime-docs=y CONFIG_PACKAGE_lime-docs-minimal=y CONFIG_PACKAGE_lime-hwd-ground-routing=y CONFIG_PACKAGE_lime-hwd-openwrt-wan=y -CONFIG_PACKAGE_lime-map-agent=y CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y From e031cc1e6b06c4190992815da3fa825f85806b28 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 18:21:44 -0300 Subject: [PATCH 019/146] remove dnsmasq from DEFAULT_PACKAGES --- configs/default_config | 1 - include/target.mk | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index cfbe90c561f4f1..7c4ffec5d83697 100644 --- a/configs/default_config +++ b/configs/default_config @@ -27,7 +27,6 @@ CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bwm-ng=y -# CONFIG_PACKAGE_dnsmasq is not set CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_dnsmasq-distributed-hosts=y CONFIG_PACKAGE_dnsmasq-lease-share=y diff --git a/include/target.mk b/include/target.mk index 53d7436311c0c7..45dd477aadb8f1 100644 --- a/include/target.mk +++ b/include/target.mk @@ -17,7 +17,7 @@ DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fs # For nas targets DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets -DEFAULT_PACKAGES.router:=dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload +DEFAULT_PACKAGES.router:=iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload DEFAULT_PACKAGES.bootloader:= ifneq ($(DUMP),) From 5488888574146e9defa80099ce6b950e1adf7197 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:41:18 -0300 Subject: [PATCH 020/146] deselect luci admin full --- configs/default_config | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/configs/default_config b/configs/default_config index 7c4ffec5d83697..aee0e348029b71 100644 --- a/configs/default_config +++ b/configs/default_config @@ -45,15 +45,17 @@ CONFIG_PACKAGE_kmod-dummy=y CONFIG_PACKAGE_kmod-ebtables=y CONFIG_PACKAGE_kmod-ebtables-ipv6=y CONFIG_PACKAGE_kmod-ip6-tunnel=y +CONFIG_PACKAGE_kmod-ipt-nat=y CONFIG_PACKAGE_kmod-iptunnel6=y CONFIG_PACKAGE_kmod-lib-crc16=y CONFIG_PACKAGE_kmod-lib-crc32c=y CONFIG_PACKAGE_kmod-macvlan=y +CONFIG_PACKAGE_kmod-nf-conntrack=y +CONFIG_PACKAGE_kmod-nf-nat=y CONFIG_PACKAGE_kmod-tun=y CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y CONFIG_PACKAGE_kmod-usb-ohci=y CONFIG_PACKAGE_libiwinfo-lua=y -CONFIG_PACKAGE_liblua=y CONFIG_PACKAGE_liblucihttp=y CONFIG_PACKAGE_liblucihttp-lua=y CONFIG_PACKAGE_libncurses=y @@ -73,18 +75,10 @@ CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y CONFIG_PACKAGE_lime-system=y -CONFIG_PACKAGE_lua=y -CONFIG_PACKAGE_luci=y -CONFIG_PACKAGE_luci-app-batman-adv=y -CONFIG_PACKAGE_luci-app-firewall=y -CONFIG_PACKAGE_luci-app-lime-location=y CONFIG_PACKAGE_luci-base=y -CONFIG_PACKAGE_luci-lib-dracula=y CONFIG_PACKAGE_luci-lib-httpclient=y CONFIG_PACKAGE_luci-lib-httpprotoutils=y CONFIG_PACKAGE_luci-lib-ip=y -CONFIG_PACKAGE_luci-lib-jquery-1-4=y -CONFIG_PACKAGE_luci-lib-jquery-flot-0-8=y CONFIG_PACKAGE_luci-lib-json=y CONFIG_PACKAGE_luci-lib-jsonc=y CONFIG_PACKAGE_luci-lib-libremap=y @@ -92,11 +86,6 @@ CONFIG_PACKAGE_luci-lib-libremap-location=y CONFIG_PACKAGE_luci-lib-libremap-system=y CONFIG_PACKAGE_luci-lib-libremap-wireless=y CONFIG_PACKAGE_luci-lib-nixio=y -CONFIG_PACKAGE_luci-mod-admin-full=y -CONFIG_PACKAGE_luci-mod-status=y -CONFIG_PACKAGE_luci-proto-ipv6=y -CONFIG_PACKAGE_luci-proto-ppp=y -CONFIG_PACKAGE_luci-theme-bootstrap=y CONFIG_PACKAGE_mtr=y CONFIG_PACKAGE_netperf=y CONFIG_PACKAGE_pv=y From 337e0ca99ec434d9fa94da140e81e6fafe2446c5 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:42:17 -0300 Subject: [PATCH 021/146] add DEVICE_TYPPE librerouter and remove breaking dependencies --- include/target.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index 45dd477aadb8f1..31588efe943099 100644 --- a/include/target.mk +++ b/include/target.mk @@ -10,7 +10,7 @@ ifneq ($(__target_inc),1) __target_inc=1 # default device type -DEVICE_TYPE?=router +DEVICE_TYPE?=librerouter # Default packages - the really basic set DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd @@ -18,6 +18,7 @@ DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fs DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets DEFAULT_PACKAGES.router:=iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload +DEFAULT_PACKAGES.librerouter:=iptables ip6tables DEFAULT_PACKAGES.bootloader:= ifneq ($(DUMP),) From ce41bd55b6ff265b66c2d5aa5f34c2092c6b328c Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:42:41 -0300 Subject: [PATCH 022/146] add kmod-usb-storage and safe-upgade device dependencies --- target/linux/ar71xx/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index f030ed34c69b51..6dc8bb308e1655 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1391,7 +1391,7 @@ TARGET_DEVICES += fritz450e define Device/librerouter-v1 DEVICE_TITLE := LibreRouter v1 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage safe-upgrade BOARDNAME := LIBREROUTERV1 IMAGE_SIZE := 32384k KERNEL := kernel-bin | lzma | uImage lzma From 46dd9a29a1dc394f35ecfe0d99e578aedcd67ccf Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:43:07 -0300 Subject: [PATCH 023/146] use libremap-gent from libremesh github --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index 5a681c88c47c0d..e853b34686c66f 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -4,5 +4,5 @@ src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b src-git libremesh https://github.com/libremesh/lime-packages.git;master -src-git libremap https://github.com/libremap/libremap-agent-openwrt.git;master +src-git libremap https://github.com/libremesh/libremap-agent.git;master src-git fbw https://github.com/libremesh/FirstBootWizard.git;master From d9be9446aa572efeb2514a30b29685aa9a3cf1d7 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:44:23 -0300 Subject: [PATCH 024/146] select babeld --- configs/default_config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/default_config b/configs/default_config index aee0e348029b71..2df93b2d0c5aac 100644 --- a/configs/default_config +++ b/configs/default_config @@ -25,6 +25,7 @@ CONFIG_PACKAGE_ALFRED_VIS=y CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y +CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bwm-ng=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y @@ -72,6 +73,7 @@ CONFIG_PACKAGE_lime-docs-minimal=y CONFIG_PACKAGE_lime-hwd-ground-routing=y CONFIG_PACKAGE_lime-hwd-openwrt-wan=y CONFIG_PACKAGE_lime-proto-anygw=y +CONFIG_PACKAGE_lime-proto-babeld=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y CONFIG_PACKAGE_lime-system=y From ec969d06546e747b02333a452578d2b2d54cecaf Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 17 Feb 2019 01:48:30 -0300 Subject: [PATCH 025/146] add kernel reset button support --- .../arch/mips/ath79/mach-librerouter-v1.c | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c index 602423a2372141..17083ecda59073 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -26,6 +26,7 @@ #include "dev-ap9x-pci.h" #include "dev-eth.h" #include "dev-leds-gpio.h" +#include "dev-gpio-buttons.h" #include "dev-m25p80.h" #include "dev-nfc.h" #include "dev-spi.h" @@ -38,6 +39,23 @@ #define LIBREROUTERV1_MAC1_OFFSET 0x6 #define LIBREROUTERV1_WMAC_CALDATA_OFFSET 0x1000 +#define LIBREROUTERV1_GPIO_BTN_RESET 17 + +#define LIBREROUTERV1_KEYS_POLL_INTERVAL 20 +#define LIBREROUTERV1_KEYS_DEBOUNCE_INTERVAL (3 * LIBREROUTERV1_KEYS_POLL_INTERVAL) + + +static struct gpio_keys_button librerouter_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = LIBREROUTERV1_KEYS_DEBOUNCE_INTERVAL, + .gpio = LIBREROUTERV1_GPIO_BTN_RESET, + .active_low = 1, + } +}; + static struct mtd_partition librerouter_spi_partitions[] = { { .name = "uboot", @@ -219,6 +237,10 @@ static void __init librerouter_v1_setup(void) ath79_register_eth(1); + ath79_register_gpio_keys_polled(-1, LIBREROUTERV1_KEYS_POLL_INTERVAL, + ARRAY_SIZE(librerouter_gpio_keys), + librerouter_gpio_keys); + ath79_register_wmac(art + LIBREROUTERV1_WMAC_CALDATA_OFFSET, NULL); ath79_register_pci(); From 436ee0435566ca1755aed495c7dc67d0e7b7e33d Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 26 Feb 2019 09:46:15 -0300 Subject: [PATCH 026/146] enable CONFIG_PACKAGE_ALFRED_BATHOSTS --- configs/default_config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/default_config b/configs/default_config index 2df93b2d0c5aac..947474bf26b9ac 100644 --- a/configs/default_config +++ b/configs/default_config @@ -3,6 +3,7 @@ CONFIG_TARGET_ar71xx_generic=y CONFIG_TARGET_ar71xx_generic_DEVICE_librerouter-v1=y CONFIG_DEVEL=y CONFIG_BUSYBOX_CUSTOM=y +CONFIG_ALFRED_NEEDS_lua=y CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y @@ -21,6 +22,7 @@ CONFIG_KMOD_BATMAN_ADV_BLA=y CONFIG_KMOD_BATMAN_ADV_DAT=y CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y CONFIG_KMOD_BATMAN_ADV_MCAST=y +CONFIG_PACKAGE_ALFRED_BATHOSTS=y CONFIG_PACKAGE_ALFRED_VIS=y CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_SPECTRAL=y From 02512072f4412795723b7a20c2ee0f01c9622dfd Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 27 Feb 2019 13:53:08 -0300 Subject: [PATCH 027/146] enable busybox CROND_SPECIAL_TIMES @reboot, @hourly, etc --- configs/default_config | 1 + package/utils/busybox/config/miscutils/Config.in | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/configs/default_config b/configs/default_config index 947474bf26b9ac..dd41d6bab1ae77 100644 --- a/configs/default_config +++ b/configs/default_config @@ -5,6 +5,7 @@ CONFIG_DEVEL=y CONFIG_BUSYBOX_CUSTOM=y CONFIG_ALFRED_NEEDS_lua=y CONFIG_BUSYBOX_CONFIG_DEVMEM=y +CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in index 61c5458b637c6b..1b978195d89f33 100644 --- a/package/utils/busybox/config/miscutils/Config.in +++ b/package/utils/busybox/config/miscutils/Config.in @@ -157,6 +157,22 @@ config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL help Command output will be sent to corresponding user via email. +config BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES + bool "Support special times (@reboot, @daily, etc) in crontabs" + default BUSYBOX_DEFAULT_FEATURE_CROND_SPECIAL_TIMES + depends on BUSYBOX_CONFIG_CROND + help + string meaning + ------ ------- + @reboot Run once, at startup + @yearly Run once a year: "0 0 1 1 *" + @annually Same as @yearly: "0 0 1 1 *" + @monthly Run once a month: "0 0 1 * *" + @weekly Run once a week: "0 0 * * 0" + @daily Run once a day: "0 0 * * *" + @midnight Same as @daily: "0 0 * * *" + @hourly Run once an hour: "0 * * * *" + config BUSYBOX_CONFIG_FEATURE_CROND_DIR string "crond spool directory" default BUSYBOX_DEFAULT_FEATURE_CROND_DIR From 255119529c5bc6f6b5fe9d7d1036f34db41f88bf Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 7 Mar 2019 18:25:31 -0300 Subject: [PATCH 028/146] use routing fork to test babeld-1.9-dev --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index e853b34686c66f..a06f631ed884ea 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^35e0b737ab496f5b51e80079b0d8c9b442e223f5 src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0bcdde570f2ca913 -src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a7845ab2183d6acd76 +src-git routing https://github.com/LibreRouterOrg/routing.git^e69b760e79a3f7543c3e459cb301a8b2e3d51056 src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b src-git libremesh https://github.com/libremesh/lime-packages.git;master From 58cc19dfe0fe40bded3bc4c27506106c679cb5d3 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 8 Mar 2019 12:45:12 -0300 Subject: [PATCH 029/146] ar71xx: fix librerouter switch config Not both ethernet ports (GMAC0/RGMII and GMAC1/SGMII) are working --- target/linux/ar71xx/base-files/etc/board.d/02_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 800d946dd62b91..31b50629a48e26 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -450,7 +450,7 @@ ar71xx_setup_interfaces() librerouter-v1) ucidef_set_interfaces_lan_wan "eth1.2" "eth0.1" ucidef_add_switch "switch0" \ - "0@eth0" "2:wan" "6@eth1" "1:lan" "3:lan" "4:lan" + "0@eth0" "5:wan" "6@eth1" "4:lan" ;; nanostation-m-xw) ucidef_add_switch "switch0" \ From f3f6c829533fcd73e88631c02b9fa895b0f61087 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 8 Mar 2019 14:46:08 -0300 Subject: [PATCH 030/146] fix 'use routing fork to test babeld-1.9-dev' hash --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index a06f631ed884ea..c9b83ef06910cc 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^35e0b737ab496f5b51e80079b0d8c9b442e223f5 src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0bcdde570f2ca913 -src-git routing https://github.com/LibreRouterOrg/routing.git^e69b760e79a3f7543c3e459cb301a8b2e3d51056 +src-git routing https://github.com/LibreRouterOrg/routing.git^0da6524a370e2498d3e386a615b3e0151a012eaf src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b src-git libremesh https://github.com/libremesh/lime-packages.git;master From 891e953701e11c988172ff853ea0581ec33b40a7 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 8 Mar 2019 17:02:23 -0300 Subject: [PATCH 031/146] update first-boot-wizard package name --- configs/default_config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index dd41d6bab1ae77..a5961d3c6f7d66 100644 --- a/configs/default_config +++ b/configs/default_config @@ -37,8 +37,7 @@ CONFIG_PACKAGE_dnsmasq-lease-share=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y -CONFIG_PACKAGE_first-boot-wizard-daemon=y -CONFIG_PACKAGE_first-boot-wizard-gui=y +CONFIG_PACKAGE_first-boot-wizard=y CONFIG_PACKAGE_ip-tiny=y CONFIG_PACKAGE_iputils-ping=y CONFIG_PACKAGE_iputils-ping6=y From 9d99db2a99e40b94fe859b3594c47cf531ab5c35 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 10 Mar 2019 15:52:09 -0300 Subject: [PATCH 032/146] select shared-state --- configs/default_config | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index a5961d3c6f7d66..f95fa24e55a6ee 100644 --- a/configs/default_config +++ b/configs/default_config @@ -4,6 +4,7 @@ CONFIG_TARGET_ar71xx_generic_DEVICE_librerouter-v1=y CONFIG_DEVEL=y CONFIG_BUSYBOX_CUSTOM=y CONFIG_ALFRED_NEEDS_lua=y +CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y @@ -33,7 +34,6 @@ CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bwm-ng=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_dnsmasq-distributed-hosts=y -CONFIG_PACKAGE_dnsmasq-lease-share=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y @@ -96,6 +96,11 @@ CONFIG_PACKAGE_pv=y CONFIG_PACKAGE_rpcd=y CONFIG_PACKAGE_rpcd-mod-rrdns=y CONFIG_PACKAGE_safe-reboot=y +CONFIG_PACKAGE_shared-state=y +CONFIG_PACKAGE_shared-state-bat_hosts=y +CONFIG_PACKAGE_shared-state-date=y +CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y +CONFIG_PACKAGE_shared-state-dnsmasq_leases=y CONFIG_PACKAGE_smonit=y CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y From 6e51c1e8427436934682acb25a98899c660c7155 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 12 Mar 2019 18:04:40 -0300 Subject: [PATCH 033/146] deselected smonit and dnsmasq-distributed-hosts --- configs/default_config | 2 -- 1 file changed, 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index f95fa24e55a6ee..712acf56ff7025 100644 --- a/configs/default_config +++ b/configs/default_config @@ -33,7 +33,6 @@ CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bwm-ng=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y -CONFIG_PACKAGE_dnsmasq-distributed-hosts=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y @@ -101,7 +100,6 @@ CONFIG_PACKAGE_shared-state-bat_hosts=y CONFIG_PACKAGE_shared-state-date=y CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y CONFIG_PACKAGE_shared-state-dnsmasq_leases=y -CONFIG_PACKAGE_smonit=y CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y From d7565ccd2a44dc4e9a4239e2a23f31cd5e93cc37 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Mar 2019 15:45:17 -0300 Subject: [PATCH 034/146] default config with all partitions R/W Allow R/W to all partitions to ease migrations of bootloaders, changing MAC addresses, etc. This config is overrided by the bootloader's bootargs mtdparts --- .../linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c index 17083ecda59073..6d27883902f5d2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -61,12 +61,10 @@ static struct mtd_partition librerouter_spi_partitions[] = { .name = "uboot", .offset = 0, .size = 0x0040000, - .mask_flags = MTD_WRITEABLE, }, { .name = "uboot-env", .offset = 0x0040000, .size = 0x0010000, - .mask_flags = MTD_WRITEABLE, }, { .name = "firmware", .offset = 0x0050000, @@ -75,7 +73,6 @@ static struct mtd_partition librerouter_spi_partitions[] = { .name = "art", .offset = 0x0ff0000, .size = 0x0010000, - .mask_flags = MTD_WRITEABLE, } }; From df35f66e61c792c2a4c87fbc9a66e857e06ad2ae Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Mar 2019 21:01:40 -0300 Subject: [PATCH 035/146] support librerouter v0 and v1 boards with v1 firmware --- target/linux/ar71xx/base-files/etc/board.d/02_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 31b50629a48e26..692411c1f454b6 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -450,7 +450,7 @@ ar71xx_setup_interfaces() librerouter-v1) ucidef_set_interfaces_lan_wan "eth1.2" "eth0.1" ucidef_add_switch "switch0" \ - "0@eth0" "5:wan" "6@eth1" "4:lan" + "0@eth0" "5:wan" "6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" ;; nanostation-m-xw) ucidef_add_switch "switch0" \ From 73bdf78b06d5a50590776fa49843df4f00414482 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 23 Mar 2019 19:01:17 -0300 Subject: [PATCH 036/146] selected package ubus-lime-fbw --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 712acf56ff7025..e113bb7dd8a106 100644 --- a/configs/default_config +++ b/configs/default_config @@ -104,6 +104,7 @@ CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y CONFIG_PACKAGE_ubus-lime-batman-adv=y +CONFIG_PACKAGE_ubus-lime-fbw=y CONFIG_PACKAGE_ubus-lime-grondrouting=y CONFIG_PACKAGE_ubus-lime-location=y CONFIG_PACKAGE_ubus-lime-metrics=y From 8d5071300c70df9c34ba58f1330d2a3c6ac04249 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 27 Apr 2019 11:51:48 -0300 Subject: [PATCH 037/146] select uhttpd-mod-lua --- configs/default_config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/default_config b/configs/default_config index e113bb7dd8a106..878eee19535547 100644 --- a/configs/default_config +++ b/configs/default_config @@ -111,5 +111,7 @@ CONFIG_PACKAGE_ubus-lime-metrics=y CONFIG_PACKAGE_ubus-lime-openairview=y CONFIG_PACKAGE_ubus-lime-utils=y CONFIG_PACKAGE_uhttpd=y +CONFIG_PACKAGE_uhttpd-mod-lua=y CONFIG_PACKAGE_uhttpd-mod-ubus=y CONFIG_PACKAGE_watchping=y +CONFIG_uhttpd_lua=y From 4e68f0ff89db03508e14481fb065c8fc702169b4 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 27 Apr 2019 11:58:29 -0300 Subject: [PATCH 038/146] add lime-defaults-factory to overwrite the package file --- .gitignore | 1 - files/etc/config/lime-defaults-factory | 63 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 files/etc/config/lime-defaults-factory diff --git a/.gitignore b/.gitignore index 84e1a9d6d18c50..b79b51f388083d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ /logs /feeds /feeds.conf -/files /overlay /package/feeds /package/openwrt-packages diff --git a/files/etc/config/lime-defaults-factory b/files/etc/config/lime-defaults-factory new file mode 100644 index 00000000000000..28a9789097fa45 --- /dev/null +++ b/files/etc/config/lime-defaults-factory @@ -0,0 +1,63 @@ +# Beware this file is NOT supposed to be edited by the end user, modify /etc/config/lime instead +# If the same option or list is defined both in /etc/config/lime and lime-defaults file, the former will prevail +# Beware this file is not supposed to store interface specific configuration, like "config net eth0" + +# Read the documentation in /docs directory +# and on http://libremesh.org + +config lime system + option hostname 'LiMe-%M4%M5%M6' + option domain 'lan' + option keep_on_upgrade 'libremesh base-files-essential /etc/sysupgrade.conf' + +config lime network + option primary_interface 'eth0' + option main_ipv4_address '10.%N1.0.0/16' + option anygw_dhcp_start '2' + option anygw_dhcp_limit '0' + option main_ipv6_address '2a00:1508:0a%N1:%N200::/64' + option bmx6_mtu '1500' + option bmx7_mtu '1500' + list protocols ieee80211s + list protocols lan + list protocols anygw + list protocols batadv:%N1 + list protocols bmx6:13 + list protocols olsr:14 + list protocols olsr6:15 + list protocols olsr2:16 + list protocols babeld:17 + list protocols bmx7:18 + list resolvers 4.2.2.2 # b.resolvers.Level3.net + list resolvers 141.1.1.1 # cns1.cw.net + list resolvers 2001:470:20::2 # ordns.he.net + option bmx6_mtu '1500' + option bmx6_publish_ownip false + option bmx6_over_batman false + option bmx6_pref_gw none + option bmx6_wifi_rate_max 54000000 + option bmx7_publish_ownip false + option bmx7_over_batman false + option bmx7_pref_gw none + option bmx7_wifi_rate_max 'auto' + option anygw_mac "aa:aa:aa:%N1:%N2:aa" + option use_odhcpd false + +config lime wifi + option channel_2ghz '11' + list channel_5ghz '157' + list channel_5ghz '48' + option htmode_5ghz 'HT40' + option distance_2ghz '100' + option distance_5ghz '1000' + list modes 'ap' + list modes 'apname' + list modes 'ieee80211s' + option ap_ssid 'LibreMesh.org' + option apname_ssid 'LibreMesh.org/%H' + option adhoc_ssid 'LiMe' + option adhoc_bssid 'ca:fe:00:c0:ff:ee' + option adhoc_mcast_rate_2ghz '24000' + option adhoc_mcast_rate_5ghz '6000' + option ieee80211s_mesh_fwding '0' + option ieee80211s_mesh_id 'LiMe' From f2a0e8e0ee3843d44cc6aa47fc7692186a7b6010 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 27 Apr 2019 11:59:19 -0300 Subject: [PATCH 039/146] change default 2.4GHz mode to AP only and 5.8GHz to mesh only The idea is that the backbone is only in 5.8GHz (at least for dual-band routers) and 2.4GHz is not part of the mesh providing local conectivity near to the node. --- files/etc/config/lime-defaults-factory | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/etc/config/lime-defaults-factory b/files/etc/config/lime-defaults-factory index 28a9789097fa45..05ad0a7f0a6ab2 100644 --- a/files/etc/config/lime-defaults-factory +++ b/files/etc/config/lime-defaults-factory @@ -50,9 +50,9 @@ config lime wifi option htmode_5ghz 'HT40' option distance_2ghz '100' option distance_5ghz '1000' - list modes 'ap' - list modes 'apname' - list modes 'ieee80211s' + list modes 'ap_2ghz' + list modes 'apname_2ghz' + list modes 'ieee80211s_5ghz' option ap_ssid 'LibreMesh.org' option apname_ssid 'LibreMesh.org/%H' option adhoc_ssid 'LiMe' From d39a2791dbc65563d9fe504a826137bd32eb764f Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 10:53:24 -0300 Subject: [PATCH 040/146] remove original README as it was cousing confusion --- README | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 55ca92af65f8f5..00000000000000 --- a/README +++ /dev/null @@ -1,34 +0,0 @@ - _______ ________ __ - | |.-----.-----.-----.| | | |.----.| |_ - | - || _ | -__| || | | || _|| _| - |_______|| __|_____|__|__||________||__| |____| - |__| W I R E L E S S F R E E D O M - ----------------------------------------------------- - -This is the buildsystem for the OpenWrt Linux distribution. - -To build your own firmware you need a Linux, BSD or MacOSX system (case -sensitive filesystem required). Cygwin is unsupported because of the lack -of a case sensitive file system. - -You need gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, -unzip, gawk, getopt, subversion, libz-dev and libc headers installed. - -1. Run "./scripts/feeds update -a" to obtain all the latest package definitions -defined in feeds.conf / feeds.conf.default - -2. Run "./scripts/feeds install -a" to install symlinks for all obtained -packages into package/feeds/ - -3. Run "make menuconfig" to select your preferred configuration for the -toolchain, target system & firmware packages. - -4. Run "make" to build your firmware. This will download all sources, build -the cross-compile toolchain and then cross-compile the Linux kernel & all -chosen applications for your target system. - -Sunshine! - Your OpenWrt Community - http://www.openwrt.org - - From 682bf489fbf73ae6263b813c6384a7e277e8636b Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 10:54:13 -0300 Subject: [PATCH 041/146] Add development instructions --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index 40612ecf385b38..b0758eeb0ea757 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,46 @@ defined in feeds.conf.default packages into package/feeds/ 3. Run `cp configs/default_config .config` 4. Run `make` to build your firmware. + + +## Development of LibreMesh packages + +To do work in libremesh packages you should make a clone of the repo and then +you can use this clone as part of the build using a local symbolic link. This way +you can change the files and run `make`. When you are satisfied by your changes you +should commit your changes to the lime-packages repo in a new branch and push this +to github and do a pull request. + +Fork the lime-packages repo in github and then clone it replacing yourgithubuser +``` +git clone git@github.com:yourgithubuser/lime-packages.git +``` + +Then edit feeds.conf.default and change the line + +``` +src-git libremesh https://github.com/libremesh/lime-packages.git;master +``` + +with this line replacing the path to repo and branch name (replace all the +line, check that src-git changed to src-link): + +``` +src-link libremesh /home/user/path/to/lime-packages +``` + +Run `./scripts/feeds update -a` and then `./scripts/feeds install -a` + +Now perform your changes to the lime-packages repo, editing files, etc. +If you are creating new packages you should run `feeds install -a` after you create +the package in order to be able to select the package with make menuconfig. + +When you want to create an image with your changes run `make`. If you need change +the package selection run `make menuconfig` and then `make`. + +## + +## Notes + +* You can speed up the build process using more CPUs, for example with `make -j3` +the build uses 3 CPUs. From 4b51413505b0d4053ec7ddb89ade574cf40ab3d5 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 11:00:10 -0300 Subject: [PATCH 042/146] added docs notes --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b0758eeb0ea757..d8c490190ca7a6 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,13 @@ the package in order to be able to select the package with make menuconfig. When you want to create an image with your changes run `make`. If you need change the package selection run `make menuconfig` and then `make`. -## ## Notes * You can speed up the build process using more CPUs, for example with `make -j3` the build uses 3 CPUs. +* For aditional documentation see + * https://openwrt.org/docs/guide-developer/build-system/use-buildsystem + * https://openwrt.org/docs/guide-developer/feeds + * https://openwrt.org/docs/guide-developer/packages + * https://openwrt.org/docs/guide-developer/start From cd4a192078afcff21bb19e8e508161870750e7c9 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 11:23:13 -0300 Subject: [PATCH 043/146] add more docs to the readme --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/README.md b/README.md index d8c490190ca7a6..1184ca07bbea7c 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,73 @@ the package in order to be able to select the package with make menuconfig. When you want to create an image with your changes run `make`. If you need change the package selection run `make menuconfig` and then `make`. +## Testing a LibreMesh branch + +========================== +Testing a LibreMesh branch +========================== + + +Edit feeds.conf.default, for example to test the `add-fft-eval` branch: + +``` +diff --git a/feeds.conf.default b/feeds.conf.default +index 5a681c88c4..ee2c5f1223 100644 +--- a/feeds.conf.default ++++ b/feeds.conf.default +@@ -3,6 +3,6 @@ src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0b + src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a7845ab2183d6acd76 + src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b + +-src-git libremesh https://github.com/libremesh/lime-packages.git;master ++src-git libremesh https://github.com/libremesh/lime-packages.git;add-fft-eval + src-git libremap https://github.com/libremap/libremap-agent-openwrt.git;master + src-git fbw https://github.com/libremesh/FirstBootWizard.git;master +``` + +``` +$ ./scripts/feeds update -a +``` + +update the feed as new packages may have beed added to a feed +``` +$ ./scripts/feeds install -a +``` + +## Changing package and options selection + +The config documentation is here `https://openwrt.org/docs/guide-developer/build-system/use-buildsystem`. +Some tips: +* The config is stored in .config +* To change the config use `make manuconfig` +* To know the difference between two configs, for example from the current config (.config) and +the default configuration run `$ ./scripts/diffconfig.sh | diff configs/default_config -` +* To save the new config to a new file (for backup purposes, to add it to a git repo, etc) run +`$ ./scripts/diffconfig.sh > configs/your_config` +* To change the default configuration, for example to perform a pull request to `git@github.com:LibreRouterOrg/openwrt.git` run +`$ ./scripts/diffconfig.sh > configs/your_config` + + +## Upgrading the buildroot + +``` +$ git pull + +$ ./scripts/feeds update -a + +$ ./scripts/feeds install -a +``` + +Copy the new config, be aware that this overwrites you local config!! +``` +$ cp configs/default_config .config +``` + +``` +$ make defconfig +$ make -j4 +... +``` ## Notes From 3407a6ebe81fc95a8f369cf480b7dafa3870a3e8 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 11:24:05 -0300 Subject: [PATCH 044/146] fixed docs --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 1184ca07bbea7c..8e307f50350fa5 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,6 @@ the package selection run `make menuconfig` and then `make`. ## Testing a LibreMesh branch -========================== -Testing a LibreMesh branch -========================== - - Edit feeds.conf.default, for example to test the `add-fft-eval` branch: ``` From 713bd7bc2fd31bc6a111c314e01ff76849f02038 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 16:23:16 -0300 Subject: [PATCH 045/146] remove fbw feed Remove as it is a libremesh package --- configs/default_config | 1 - feeds.conf.default | 1 - 2 files changed, 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index 878eee19535547..18419f28fb45eb 100644 --- a/configs/default_config +++ b/configs/default_config @@ -10,7 +10,6 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y -# CONFIG_FEED_fbw is not set # CONFIG_FEED_libremap is not set # CONFIG_FEED_libremesh is not set # CONFIG_FEED_luci is not set diff --git a/feeds.conf.default b/feeds.conf.default index c9b83ef06910cc..f8462148777337 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -5,4 +5,3 @@ src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb src-git libremesh https://github.com/libremesh/lime-packages.git;master src-git libremap https://github.com/libremesh/libremap-agent.git;master -src-git fbw https://github.com/libremesh/FirstBootWizard.git;master From 82771bb8ea0cedfc177f70389a68cf0592c69cf0 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 16:26:20 -0300 Subject: [PATCH 046/146] selected pirania-app, shared-state-pirania and shared-state-persist --- configs/default_config | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configs/default_config b/configs/default_config index 18419f28fb45eb..495133b6c61b5d 100644 --- a/configs/default_config +++ b/configs/default_config @@ -30,6 +30,7 @@ CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y +CONFIG_PACKAGE_block-mount=y CONFIG_PACKAGE_bwm-ng=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_ebtables=y @@ -37,6 +38,8 @@ CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y CONFIG_PACKAGE_first-boot-wizard=y CONFIG_PACKAGE_ip-tiny=y +CONFIG_PACKAGE_ip6tables-mod-nat=y +CONFIG_PACKAGE_ipset=y CONFIG_PACKAGE_iputils-ping=y CONFIG_PACKAGE_iputils-ping6=y CONFIG_PACKAGE_kmod-batman-adv=y @@ -45,20 +48,32 @@ CONFIG_PACKAGE_kmod-crypto-hash=y CONFIG_PACKAGE_kmod-dummy=y CONFIG_PACKAGE_kmod-ebtables=y CONFIG_PACKAGE_kmod-ebtables-ipv6=y +CONFIG_PACKAGE_kmod-fs-vfat=y CONFIG_PACKAGE_kmod-ip6-tunnel=y +CONFIG_PACKAGE_kmod-ipt-conntrack=y +CONFIG_PACKAGE_kmod-ipt-ipset=y CONFIG_PACKAGE_kmod-ipt-nat=y +CONFIG_PACKAGE_kmod-ipt-nat6=y CONFIG_PACKAGE_kmod-iptunnel6=y CONFIG_PACKAGE_kmod-lib-crc16=y CONFIG_PACKAGE_kmod-lib-crc32c=y CONFIG_PACKAGE_kmod-macvlan=y CONFIG_PACKAGE_kmod-nf-conntrack=y +CONFIG_PACKAGE_kmod-nf-conntrack6=y CONFIG_PACKAGE_kmod-nf-nat=y +CONFIG_PACKAGE_kmod-nf-nat6=y +CONFIG_PACKAGE_kmod-nfnetlink=y +CONFIG_PACKAGE_kmod-nls-cp437=y +CONFIG_PACKAGE_kmod-nls-iso8859-1=y +CONFIG_PACKAGE_kmod-nls-utf8=y CONFIG_PACKAGE_kmod-tun=y CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y CONFIG_PACKAGE_kmod-usb-ohci=y +CONFIG_PACKAGE_libipset=y CONFIG_PACKAGE_libiwinfo-lua=y CONFIG_PACKAGE_liblucihttp=y CONFIG_PACKAGE_liblucihttp-lua=y +CONFIG_PACKAGE_libmnl=y CONFIG_PACKAGE_libncurses=y CONFIG_PACKAGE_libpcap=y CONFIG_PACKAGE_libremap-agent=y @@ -90,6 +105,8 @@ CONFIG_PACKAGE_luci-lib-libremap-wireless=y CONFIG_PACKAGE_luci-lib-nixio=y CONFIG_PACKAGE_mtr=y CONFIG_PACKAGE_netperf=y +CONFIG_PACKAGE_pirania=y +CONFIG_PACKAGE_pirania-app=y CONFIG_PACKAGE_pv=y CONFIG_PACKAGE_rpcd=y CONFIG_PACKAGE_rpcd-mod-rrdns=y @@ -99,6 +116,8 @@ CONFIG_PACKAGE_shared-state-bat_hosts=y CONFIG_PACKAGE_shared-state-date=y CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y CONFIG_PACKAGE_shared-state-dnsmasq_leases=y +CONFIG_PACKAGE_shared-state-persist=y +CONFIG_PACKAGE_shared-state-pirania=y CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y From 588e1e0c760a4673d55917d4f72797b3c7a1fc1b Mon Sep 17 00:00:00 2001 From: luandro Date: Fri, 17 May 2019 10:06:29 -0300 Subject: [PATCH 047/146] added dockerfile and docker readme --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ---------------------------- Dockerfile | 17 +++++++++++++ README.md | 9 +++++++ 3 files changed, 26 insertions(+), 38 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 Dockerfile diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea7824f11b..00000000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000000..9cbbd46e565265 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:18.04 + +RUN apt-get update &&\ + apt-get install -y sudo time git-core vim subversion build-essential gcc-multilib \ + libncurses5-dev zlib1g-dev gawk flex gettext wget unzip python &&\ + apt-get clean + +RUN useradd -m openwrt &&\ + echo 'openwrt ALL=NOPASSWD: ALL' > /etc/sudoers.d/openwrt + +USER openwrt +WORKDIR /home/openwrt + +RUN git clone https://github.com/LibreRouterOrg/openwrt.git &&\ + openwrt/scripts/feeds update -a &&\ + openwrt/scripts/feeds install -a &&\ + cp openwrt/configs/default_config openwrt/.config \ No newline at end of file diff --git a/README.md b/README.md index 8e307f50350fa5..150eebce355498 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ ## Build instructions +### Building in running system + You need gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, unzip, gawk, getopt, subversion, libz-dev and libc headers installed. @@ -12,6 +14,13 @@ packages into package/feeds/ 4. Run `make` to build your firmware. +### Building in docker container + +You need Docker installed, if you don't have it run `wget -O - https://get.docker.com | bash` to install. + +Simply run `docker run -it luandro/libremesh bash` or clone this repository and create a `docker build` yourself, after you've modified the necessary files. + + ## Development of LibreMesh packages To do work in libremesh packages you should make a clone of the repo and then From d256755a996eb5cc74971d7e9520d19850d9a7b2 Mon Sep 17 00:00:00 2001 From: luandro Date: Fri, 17 May 2019 10:47:05 -0300 Subject: [PATCH 048/146] better docker docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 150eebce355498..f546422bdd1c5e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ packages into package/feeds/ You need Docker installed, if you don't have it run `wget -O - https://get.docker.com | bash` to install. -Simply run `docker run -it luandro/libremesh bash` or clone this repository and create a `docker build` yourself, after you've modified the necessary files. +Simply run `docker run -it luandro/libremesh bash` or clone this repository and create a `docker build` yourself after you've modified the necessary files. Inside the container `cd openwrt` and run `make menuconfig` to select your targets and packages. Finally run `make` to build. ## Development of LibreMesh packages From c814d436b06ad08681d782757cb95e9ff5ffb795 Mon Sep 17 00:00:00 2001 From: spiccinini Date: Sat, 18 May 2019 17:13:49 -0300 Subject: [PATCH 049/146] Fix docs in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e307f50350fa5..cb55661747e0f1 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ the default configuration run `$ ./scripts/diffconfig.sh | diff configs/default * To save the new config to a new file (for backup purposes, to add it to a git repo, etc) run `$ ./scripts/diffconfig.sh > configs/your_config` * To change the default configuration, for example to perform a pull request to `git@github.com:LibreRouterOrg/openwrt.git` run -`$ ./scripts/diffconfig.sh > configs/your_config` +`$ ./scripts/diffconfig.sh > configs/default_config` ## Upgrading the buildroot From 3a93c64afae995e026005172dd26a80d12b2f4fe Mon Sep 17 00:00:00 2001 From: Ilario Gelmetti Date: Sun, 26 May 2019 12:22:37 +0200 Subject: [PATCH 050/146] default_config explicitly unset dnsmasq, useful when compiling on openwrt trunk --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 495133b6c61b5d..cb8cb8ea3b2bc1 100644 --- a/configs/default_config +++ b/configs/default_config @@ -32,6 +32,7 @@ CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_block-mount=y CONFIG_PACKAGE_bwm-ng=y +# CONFIG_PACKAGE_dnsmasq is not set CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y From 0d45020f63510f691797338199aa242e314bb302 Mon Sep 17 00:00:00 2001 From: Daniel Engberg Date: Thu, 7 Jun 2018 19:21:12 +0200 Subject: [PATCH 051/146] tools/bison: Update to 3.0.5 Update bison to 3.0.5 Bugfix release Remove 001-fix-macos-vasnprintf.patch as it is fixed upstream Signed-off-by: Daniel Engberg (cherry picked from commit df02e7a3c790552c9620242544ec0137dae6a32b) --- tools/bison/Makefile | 6 ++--- .../patches/001-fix-macos-vasnprintf.patch | 25 ------------------- .../bison/patches/100-fix-gets-removal.patch | 11 +++++--- 3 files changed, 10 insertions(+), 32 deletions(-) delete mode 100644 tools/bison/patches/001-fix-macos-vasnprintf.patch diff --git a/tools/bison/Makefile b/tools/bison/Makefile index af5737c552384f..68e06ae33b566d 100644 --- a/tools/bison/Makefile +++ b/tools/bison/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2008-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bison -PKG_VERSION:=3.0.4 +PKG_VERSION:=3.0.5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1 +PKG_HASH:=075cef2e814642e30e10e8155e93022e4a91ca38a65aa1d5467d4e969f97f338 HOST_BUILD_PARALLEL:=1 diff --git a/tools/bison/patches/001-fix-macos-vasnprintf.patch b/tools/bison/patches/001-fix-macos-vasnprintf.patch deleted file mode 100644 index e41315d34ec7d2..00000000000000 --- a/tools/bison/patches/001-fix-macos-vasnprintf.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/lib/vasnprintf.c -+++ b/lib/vasnprintf.c -@@ -4858,7 +4858,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t * - #endif - *fbp = dp->conversion; - #if USE_SNPRINTF --# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -+# if ! (((__GLIBC__ > 2 \ -+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ -+ && !defined __UCLIBC__) \ -+ || (defined __APPLE__ && defined __MACH__) \ -+ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) - fbp[1] = '%'; - fbp[2] = 'n'; - fbp[3] = '\0'; -@@ -4872,6 +4876,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t * - in format strings in writable memory may crash the program - (if compiled with _FORTIFY_SOURCE=2), so we should avoid it - in this situation. */ -+ /* macOS 10.13 High Sierra behaves like glibc with -+ _FORTIFY_SOURCE=2, and older macOS releases -+ presumably do not need %n. */ - /* On native Windows systems (such as mingw), we can avoid using - %n because: - - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, diff --git a/tools/bison/patches/100-fix-gets-removal.patch b/tools/bison/patches/100-fix-gets-removal.patch index 20b18cf2e7cd72..563c12040c594f 100644 --- a/tools/bison/patches/100-fix-gets-removal.patch +++ b/tools/bison/patches/100-fix-gets-removal.patch @@ -1,6 +1,8 @@ +diff --git a/lib/stdio.in.h b/lib/stdio.in.h +index ff7c9c8..f391832 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h -@@ -719,13 +719,6 @@ +@@ -739,14 +739,6 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " # endif #endif @@ -8,9 +10,10 @@ - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets --#if HAVE_RAW_DECL_GETS +-#if HAVE_RAW_DECL_GETS && !defined __cplusplus -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - - +- #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ + struct obstack; + /* Grow an obstack with formatted output. Return the number of From 9711e79285a8893a69ee49827f046227657adfe6 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 29 May 2019 17:17:19 -0300 Subject: [PATCH 052/146] add minodo.info and meuno.info aliases to thisnode.info --- files/etc/config/uci-defaults/96-thisnode-info-translation | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 files/etc/config/uci-defaults/96-thisnode-info-translation diff --git a/files/etc/config/uci-defaults/96-thisnode-info-translation b/files/etc/config/uci-defaults/96-thisnode-info-translation new file mode 100755 index 00000000000000..f158041968fb75 --- /dev/null +++ b/files/etc/config/uci-defaults/96-thisnode-info-translation @@ -0,0 +1,2 @@ +#!/bin/sh +sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/minodo.info/|/meuno.info/|}' /etc/config/dhcp From b6c609aa3a6b4b4c181b0b83aa48b1735d53c754 Mon Sep 17 00:00:00 2001 From: spiccinini Date: Thu, 6 Jun 2019 14:18:01 -0300 Subject: [PATCH 053/146] update routing feed: "Fix babeld interface configuration in init script" --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index f8462148777337..503a3c1b43dd93 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^35e0b737ab496f5b51e80079b0d8c9b442e223f5 src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0bcdde570f2ca913 -src-git routing https://github.com/LibreRouterOrg/routing.git^0da6524a370e2498d3e386a615b3e0151a012eaf +src-git routing https://github.com/LibreRouterOrg/routing.git^d72af94632b875fe2b55b2f91a55375cf8c2657d src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b src-git libremesh https://github.com/libremesh/lime-packages.git;master From 338454e2c9652b88a325c7545b1b98b979199fd6 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 7 Jun 2019 12:25:37 -0300 Subject: [PATCH 054/146] fix 96-thisnode-info-translation sed: bad option in substitution expression --- files/etc/config/uci-defaults/96-thisnode-info-translation | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/etc/config/uci-defaults/96-thisnode-info-translation b/files/etc/config/uci-defaults/96-thisnode-info-translation index f158041968fb75..f8bacb0e5727d8 100755 --- a/files/etc/config/uci-defaults/96-thisnode-info-translation +++ b/files/etc/config/uci-defaults/96-thisnode-info-translation @@ -1,2 +1,3 @@ #!/bin/sh -sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/minodo.info/|/meuno.info/|}' /etc/config/dhcp +sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/minodo.info/|}' /etc/config/dhcp +sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/meuno.info/|}' /etc/config/dhcp From 0e5d95057eb66113290c1d653087e7567a3f48a7 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 7 Jun 2019 12:26:36 -0300 Subject: [PATCH 055/146] fix uci-defaults inside /etc/config instead of /etc --- files/etc/{config => }/uci-defaults/96-thisnode-info-translation | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename files/etc/{config => }/uci-defaults/96-thisnode-info-translation (100%) diff --git a/files/etc/config/uci-defaults/96-thisnode-info-translation b/files/etc/uci-defaults/96-thisnode-info-translation similarity index 100% rename from files/etc/config/uci-defaults/96-thisnode-info-translation rename to files/etc/uci-defaults/96-thisnode-info-translation From 6bfb6ab18ce950212e123dec41ca6b5fd187cd90 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 7 Jun 2019 12:45:32 -0300 Subject: [PATCH 056/146] change default firmware partition size to dual partition size Change the size of the firmware partition from 16000kB to 7936kB. This size is the same used by the bootloader. The rationale behind this change is that if for any reason the boot process doesn't use the correct partitions provided by the bootloader in mtdparts then this size will be used and with a 16000kB size (only one big partiton) default then the image will boot and jffs2 will corrupt the "stable" partition. --- target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c index 6d27883902f5d2..1aff5cf2fccd1f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -68,7 +68,7 @@ static struct mtd_partition librerouter_spi_partitions[] = { }, { .name = "firmware", .offset = 0x0050000, - .size = 0x0fa0000, + .size = 0x07c0000, }, { .name = "art", .offset = 0x0ff0000, From b0051254ea95b4b7d190cb6178745bc398ddfd85 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 7 Jun 2019 15:59:27 -0300 Subject: [PATCH 057/146] update routing feed with babeld init fixes --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index 503a3c1b43dd93..ae50d231d83870 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^35e0b737ab496f5b51e80079b0d8c9b442e223f5 src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0bcdde570f2ca913 -src-git routing https://github.com/LibreRouterOrg/routing.git^d72af94632b875fe2b55b2f91a55375cf8c2657d +src-git routing https://github.com/LibreRouterOrg/routing.git^d14caf1e6ba61a53624af199cfa90fc28311ea57 src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b src-git libremesh https://github.com/libremesh/lime-packages.git;master From 8a45cb44372bb5483da36bbe9663650a14375f9d Mon Sep 17 00:00:00 2001 From: patogit Date: Fri, 7 Jun 2019 21:21:33 -0500 Subject: [PATCH 058/146] add time as a dependency and clarify make menu process --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cb55661747e0f1..23af3c5cce4a3a 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ ## Build instructions -You need gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, -unzip, gawk, getopt, subversion, libz-dev and libc headers installed. +Dependencies: You must have installed: gcc, binutils, bzip2, flex, python, +perl, make, find, grep, diff, unzip, gawk, getopt, subversion, time, +libz-dev (or zlib) and libc headers. 1. Run `./scripts/feeds update -a` to obtain all the latest package definitions defined in feeds.conf.default 2. Run `./scripts/feeds install -a` to install symlinks for all obtained packages into package/feeds/ 3. Run `cp configs/default_config .config` -4. Run `make` to build your firmware. +4. Run `make` to build your firmware. After choosing the options in the ncurses +menu, choose Exit and then Yes when asked if you want to save. ## Development of LibreMesh packages From f4bb1e262984a78d37064f7be15d493acd5cfaa9 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 15 Jun 2019 13:18:34 -0300 Subject: [PATCH 059/146] http redirect / to /app by default --- files/www/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 files/www/index.html diff --git a/files/www/index.html b/files/www/index.html new file mode 100644 index 00000000000000..c0a2a9a92f2cf5 --- /dev/null +++ b/files/www/index.html @@ -0,0 +1,11 @@ + + + + + + + + +LiMe-App + + From b55e855249c445e958f4154b1829c08d2a71bec2 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 15 Jun 2019 15:36:36 -0300 Subject: [PATCH 060/146] remove translation of thisnode.info in uci-defaults This doesn't work well as when the config is regenerated this won't run again. It must be implemented in another way. --- files/etc/uci-defaults/96-thisnode-info-translation | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 files/etc/uci-defaults/96-thisnode-info-translation diff --git a/files/etc/uci-defaults/96-thisnode-info-translation b/files/etc/uci-defaults/96-thisnode-info-translation deleted file mode 100755 index f8bacb0e5727d8..00000000000000 --- a/files/etc/uci-defaults/96-thisnode-info-translation +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/minodo.info/|}' /etc/config/dhcp -sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/meuno.info/|}' /etc/config/dhcp From 64876873c145c476f53604a4479ab5500c3a3a1b Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Sat, 16 Dec 2017 21:36:12 +0100 Subject: [PATCH 061/146] ar71xx: war: spi-nor: force-disable 4-byte mode only support flash chips up to 16mb and truncate larger chips instead of attempting to switch to 4-byte addressing mode which doesn't work on QCA SPI hardware nor the rom loader. --- .../999-hack-spi-nor-disable-4byte-mode.patch | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.9/999-hack-spi-nor-disable-4byte-mode.patch diff --git a/target/linux/ar71xx/patches-4.9/999-hack-spi-nor-disable-4byte-mode.patch b/target/linux/ar71xx/patches-4.9/999-hack-spi-nor-disable-4byte-mode.patch new file mode 100644 index 00000000000000..f1c0da798bd55b --- /dev/null +++ b/target/linux/ar71xx/patches-4.9/999-hack-spi-nor-disable-4byte-mode.patch @@ -0,0 +1,38 @@ +Index: linux-4.9.67/drivers/mtd/spi-nor/spi-nor.c +=================================================================== +--- linux-4.9.67.orig/drivers/mtd/spi-nor/spi-nor.c ++++ linux-4.9.67/drivers/mtd/spi-nor/spi-nor.c +@@ -1151,7 +1151,10 @@ static const struct flash_info spi_nor_i + { "w25q80", INFO(0xef5014, 0, 64 * 1024, 16, SECT_4K) }, + { "w25q80bl", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) }, + { "w25q128", INFO(0xef4018, 0, 64 * 1024, 256, SECT_4K) }, +- { "w25q256", INFO(0xef4019, 0, 64 * 1024, 512, SECT_4K) }, ++ { "w25q256", INFO(0xef4019, 0, 64 * 1024, 256, ++ SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | ++ SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) ++ }, + + /* Catalyst / On Semiconductor -- non-JEDEC */ + { "cat25c11", CAT25_INFO( 16, 8, 16, 1, SPI_NOR_NO_ERASE | SPI_NOR_NO_FR) }, +@@ -1711,20 +1714,7 @@ int spi_nor_scan(struct spi_nor *nor, co + } + + nor->program_opcode = SPINOR_OP_PP; +- +- if (info->addr_width) +- nor->addr_width = info->addr_width; +- else if (mtd->size > 0x1000000) { +- /* enable 4-byte addressing if the device exceeds 16MiB */ +- nor->addr_width = 4; +- if (JEDEC_MFR(info) == SNOR_MFR_SPANSION || +- info->flags & SPI_NOR_4B_OPCODES) +- spi_nor_set_4byte_opcodes(nor, info); +- else +- set_4byte(nor, info, 1); +- } else { +- nor->addr_width = 3; +- } ++ nor->addr_width = 3; + + if (nor->addr_width > SPI_NOR_MAX_ADDR_WIDTH) { + dev_err(dev, "address width is too large: %u\n", From 08c5264e34790957e473f6dd3786546dfd0f7bed Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 15 Dec 2017 21:22:07 +0100 Subject: [PATCH 062/146] ar71xx: add support for LibreRouter v1 Based on 6325eeec2d72a4b14883c46b8423ba8580cbd2e6 by Daniel Golle --- .../ar71xx/base-files/etc/board.d/02_network | 5 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.9 | 1 + .../files/arch/mips/ath79/Kconfig.openwrt | 10 + .../ar71xx/files/arch/mips/ath79/Makefile | 1 + .../arch/mips/ath79/mach-librerouter-v1.c | 209 ++++++++++++++++++ .../ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/generic.mk | 11 + 9 files changed, 242 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index e9522252a2b8ba..bbee12d3f29d4b 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -447,6 +447,11 @@ ar71xx_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "5:wan" "6@eth1" ;; + librerouter-v1) + ucidef_set_interfaces_lan_wan "eth1.2" "eth0.1" + ucidef_add_switch "switch0" \ + "0@eth0" "2:wan" "6@eth1" "1:lan" "3:lan" "4:lan" + ;; nanostation-m-xw) ucidef_add_switch "switch0" \ "0@eth0" "5:lan" "1:wan" diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index ccbd4e77c324a3..48b456c293b1dd 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -804,6 +804,9 @@ ar71xx_board_detect() { *"LAN Turtle") name="lan-turtle" ;; + *"LibreRouter v1"*) + name="librerouter-v1" + ;; *"Lima"*) name="lima" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index ca1270b7fdc84c..242c30906b23f1 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -274,6 +274,7 @@ platform_check_image() { hornet-ub-x2|\ jwap230|\ lbe-m5|\ + librerouter-v1|\ lima|\ loco-m-xw|\ mzk-w04nu|\ diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 index 8aa0b41ae961d2..7f2689688e71c8 100644 --- a/target/linux/ar71xx/config-4.9 +++ b/target/linux/ar71xx/config-4.9 @@ -138,6 +138,7 @@ CONFIG_ATH79=y # CONFIG_ATH79_MACH_JWAP230 is not set # CONFIG_ATH79_MACH_KOALA is not set # CONFIG_ATH79_MACH_LAN_TURTLE is not set +# CONFIG_ATH79_MACH_LIBREROUTERV1 is not set # CONFIG_ATH79_MACH_LIMA is not set # CONFIG_ATH79_MACH_MC_MAC1200R is not set # CONFIG_ATH79_MACH_MR12 is not set diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 1d0e3d910d42ab..409fb47c9d8b5e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1012,6 +1012,16 @@ config ATH79_MACH_WIFI_PINEAPPLE_NANO select ATH79_DEV_USB select ATH79_DEV_WMAC +config ATH79_MACH_LIBREROUTERV1 + bool "LibreRouter v1 board support" + select SOC_QCA955X + select ATH79_DEV_ETH + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_USB + select ATH79_DEV_WMAC + config ATH79_MACH_WRT160NL bool "Linksys WRT160NL board support" select SOC_AR913X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 8800a7de102006..e6a83fd981804a 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -149,6 +149,7 @@ obj-$(CONFIG_ATH79_MACH_JWAP003) += mach-jwap003.o obj-$(CONFIG_ATH79_MACH_JWAP230) += mach-jwap230.o obj-$(CONFIG_ATH79_MACH_KOALA) += mach-koala.o obj-$(CONFIG_ATH79_MACH_LAN_TURTLE) += mach-lan-turtle.o +obj-$(CONFIG_ATH79_MACH_LIBREROUTERV1) += mach-librerouter-v1.o obj-$(CONFIG_ATH79_MACH_LIMA) += mach-lima.o obj-$(CONFIG_ATH79_MACH_MC_MAC1200R) += mach-mc-mac1200r.o obj-$(CONFIG_ATH79_MACH_MR12) += mach-mr12.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c new file mode 100644 index 00000000000000..dfc7658ed10da1 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -0,0 +1,209 @@ +/* + * LibreRouter v1 support (based on AP135) + * + * Copyright (C) 2017 Daniel Golle + * + * Based on mach-wpj558.c and mach-tl-wr1043nd-v2.c + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include "common.h" +#include "dev-ap9x-pci.h" +#include "dev-eth.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-nfc.h" +#include "dev-spi.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" +#include "pci.h" + +#define LIBREROUTERV1_MAC0_OFFSET 0x0 +#define LIBREROUTERV1_MAC1_OFFSET 0x6 +#define LIBREROUTERV1_WMAC_CALDATA_OFFSET 0x1000 + +static struct mtd_partition librerouter_spi_partitions[] = { + { + .name = "uboot", + .offset = 0, + .size = 0x0040000, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "uboot-env", + .offset = 0x0040000, + .size = 0x0010000, + .mask_flags = MTD_WRITEABLE, + }, { + .name = "firmware", + .offset = 0x0050000, + .size = 0x0fa0000, + }, { + .name = "art", + .offset = 0x0ff0000, + .size = 0x0010000, + .mask_flags = MTD_WRITEABLE, + } +}; + +static struct flash_platform_data librerouter_spi_flash_data = { + .parts = librerouter_spi_partitions, + .nr_parts = ARRAY_SIZE(librerouter_spi_partitions), +}; + +static struct spi_board_info librerouter_spi_info[] = { + { + .bus_num = 0, + .chip_select = 0, + .max_speed_hz = 25000000, + .modalias = "w25q256", + .platform_data = &librerouter_spi_flash_data, + }, +}; + +static struct ath79_spi_platform_data librerouter_spi_data = { + .bus_num = 0, + .num_chipselect = 1, +}; + +static const struct ar8327_led_info librerouter_leds_qca8337[] = { + AR8327_LED_INFO(PHY0_0, HW, "librerouter:green:link0"), + AR8327_LED_INFO(PHY1_0, HW, "librerouter:green:link1"), +}; + +/* Blink rate: 1 Gbps -> 8 hz, 100 Mbs -> 4 Hz, 10 Mbps -> 2 Hz */ +static struct ar8327_led_cfg librerouter_qca8337_led_cfg = { + .led_ctrl0 = 0xcf37cf37, + .led_ctrl1 = 0xcf37cf37, + .led_ctrl2 = 0xcf37cf37, + .led_ctrl3 = 0x0, + .open_drain = true, +}; + +/* QCA8337 GMAC0 is connected with QCA9558 over RGMII */ +static struct ar8327_pad_cfg librerouter_qca8337_pad0_cfg = { + .mode = AR8327_PAD_MAC_RGMII, + .txclk_delay_en = true, + .rxclk_delay_en = true, + .txclk_delay_sel = AR8327_CLK_DELAY_SEL1, + .rxclk_delay_sel = AR8327_CLK_DELAY_SEL2, + .mac06_exchange_dis = false, +}; + +/* QCA8337 GMAC6 is connected with QCA9558 over SGMII */ +static struct ar8327_pad_cfg librerouter_qca8337_pad6_cfg = { + .mode = AR8327_PAD_MAC_SGMII, + .sgmii_delay_en = true, + .rxclk_delay_sel = AR8327_CLK_DELAY_SEL0, +}; + + +static struct ar8327_platform_data librerouter_qca8337_data = { + .pad0_cfg = &librerouter_qca8337_pad0_cfg, + .pad6_cfg = &librerouter_qca8337_pad6_cfg, + .port0_cfg = { + .force_link = 1, + .speed = AR8327_PORT_SPEED_1000, + .duplex = 1, + .txpause = 1, + .rxpause = 1, + }, + .port6_cfg = { + .force_link = 1, + .speed = AR8327_PORT_SPEED_1000, + .duplex = 1, + .txpause = 1, + .rxpause = 1, + }, + .led_cfg = &librerouter_qca8337_led_cfg, + .num_leds = ARRAY_SIZE(librerouter_leds_qca8337), + .leds = librerouter_leds_qca8337, +}; + +static struct mdio_board_info librerouter_mdio0_info[] = { + { + .bus_id = "ag71xx-mdio.0", + .phy_addr = 0, + .platform_data = &librerouter_qca8337_data, + }, +}; + +static void __init librerouter_setup_qca955x_eth_cfg(u32 mask, + unsigned int rxd, + unsigned int rxdv, + unsigned int txd, + unsigned int txe) +{ + void __iomem *base; + u32 t; + + base = ioremap(QCA955X_GMAC_BASE, QCA955X_GMAC_SIZE); + + t = mask; + t |= rxd << QCA955X_ETH_CFG_RXD_DELAY_SHIFT; + t |= rxdv << QCA955X_ETH_CFG_RDV_DELAY_SHIFT; + t |= txd << QCA955X_ETH_CFG_TXD_DELAY_SHIFT; + t |= txe << QCA955X_ETH_CFG_TXE_DELAY_SHIFT; + + __raw_writel(t, base + QCA955X_GMAC_REG_ETH_CFG); + + iounmap(base); +} + +static void __init librerouter_v1_setup(void) +{ + u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); + + ath79_gpio_function_enable(AR934X_GPIO_FUNC_JTAG_DISABLE); + ath79_register_spi(&librerouter_spi_data, + librerouter_spi_info, + ARRAY_SIZE(librerouter_spi_info)); + + mdiobus_register_board_info(librerouter_mdio0_info, + ARRAY_SIZE(librerouter_mdio0_info)); + ath79_register_mdio(0, 0x0); + + librerouter_setup_qca955x_eth_cfg(QCA955X_ETH_CFG_RGMII_EN, 2, 2, 0, 0); + + /* QCA9558 GMAC0 is connected to RMGII interface */ + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII; + ath79_eth0_data.phy_mask = BIT(0); + ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev; + ath79_eth0_pll_data.pll_1000 = 0xa6000000; + + ath79_init_mac(ath79_eth0_data.mac_addr, art + LIBREROUTERV1_MAC0_OFFSET, 0); + ath79_register_eth(0); + + /* QCA9558 GMAC1 is connected to SGMII interface */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_SGMII; + ath79_eth1_data.speed = SPEED_1000; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_eth1_pll_data.pll_1000 = 0x03000101; + + ath79_init_mac(ath79_eth1_data.mac_addr, art + LIBREROUTERV1_MAC1_OFFSET, 0); + + ath79_register_eth(1); + + ath79_register_wmac(art + LIBREROUTERV1_WMAC_CALDATA_OFFSET, NULL); + + ath79_register_pci(); + ath79_register_usb(); + ath79_register_nfc(); +} + +MIPS_MACHINE(ATH79_MACH_LIBREROUTERV1, "LIBREROUTERV1", "LibreRouter v1", librerouter_v1_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 80f6e1d95b7a4e..8f329768888448 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -148,6 +148,7 @@ enum ath79_mach_type { ATH79_MACH_JWAP230, /* jjPlus JWAP230 */ ATH79_MACH_KOALA, /* OCEDO Koala */ ATH79_MACH_LAN_TURTLE, /* Hak5 LAN Turtle */ + ATH79_MACH_LIBREROUTERV1, /* LibreRouter v1 */ ATH79_MACH_LIMA, /* 8devices Lima */ ATH79_MACH_MC_MAC1200R, /* MERCURY MAC1200R */ ATH79_MACH_MR12, /* Cisco Meraki MR12 */ diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 640557532c8a02..4a9dafebfc26a9 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1388,3 +1388,14 @@ define Device/fritz450e IMAGE_SIZE := 15232k endef TARGET_DEVICES += fritz450e + +define Device/librerouter-v1 + DEVICE_TITLE := LibreRouter v1 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 + BOARDNAME := LIBREROUTERV1 + IMAGE_SIZE := 32384k + KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma + IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) +endef +TARGET_DEVICES += librerouter-v1 From 9400512a62aa9160eabd6bb4758a0f3ec6f254f2 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 4 Nov 2018 15:06:07 -0300 Subject: [PATCH 063/146] LibreRouter: use cmdline from u-boot --- target/linux/ar71xx/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 4a9dafebfc26a9..f030ed34c69b51 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1394,7 +1394,7 @@ define Device/librerouter-v1 DEVICE_PACKAGES := kmod-usb-core kmod-usb2 BOARDNAME := LIBREROUTERV1 IMAGE_SIZE := 32384k - KERNEL := kernel-bin | patch-cmdline | lzma | uImage lzma + KERNEL := kernel-bin | lzma | uImage lzma IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) endef From 20235c83ccb705293e84b17b6998f46bd0087b24 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 15 Nov 2018 02:07:22 -0300 Subject: [PATCH 064/146] ar71xx: add secondary QCA9558 UART (UART1) to LibreRouter --- .../arch/mips/ath79/mach-librerouter-v1.c | 22 +++++++++++++++++++ ...IPS-ath79-add-qca955x-uart1-reg-defs.patch | 11 ++++++++++ 2 files changed, 33 insertions(+) create mode 100644 target/linux/ar71xx/patches-4.9/917-MIPS-ath79-add-qca955x-uart1-reg-defs.patch diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c index dfc7658ed10da1..602423a2372141 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -81,6 +81,26 @@ static struct ath79_spi_platform_data librerouter_spi_data = { .num_chipselect = 1, }; +static struct resource librerouter_uart1_resources[] = { + { + .start = QCA955X_UART1_BASE, + .end = QCA955X_UART1_BASE + QCA955X_UART1_SIZE - 1, + .flags = IORESOURCE_MEM, + }, + { + .start = ATH79_MISC_IRQ(6), + .end = ATH79_MISC_IRQ(6), + .flags = IORESOURCE_IRQ, + }, +}; + +static struct platform_device librerouter_uart1_device = { + .name = "ar933x-uart", + .id = -1, + .resource = librerouter_uart1_resources, + .num_resources = ARRAY_SIZE(librerouter_uart1_resources), +}; + static const struct ar8327_led_info librerouter_leds_qca8337[] = { AR8327_LED_INFO(PHY0_0, HW, "librerouter:green:link0"), AR8327_LED_INFO(PHY1_0, HW, "librerouter:green:link1"), @@ -204,6 +224,8 @@ static void __init librerouter_v1_setup(void) ath79_register_pci(); ath79_register_usb(); ath79_register_nfc(); + + platform_device_register(&librerouter_uart1_device); } MIPS_MACHINE(ATH79_MACH_LIBREROUTERV1, "LIBREROUTERV1", "LibreRouter v1", librerouter_v1_setup); diff --git a/target/linux/ar71xx/patches-4.9/917-MIPS-ath79-add-qca955x-uart1-reg-defs.patch b/target/linux/ar71xx/patches-4.9/917-MIPS-ath79-add-qca955x-uart1-reg-defs.patch new file mode 100644 index 00000000000000..db19bfcbbecf57 --- /dev/null +++ b/target/linux/ar71xx/patches-4.9/917-MIPS-ath79-add-qca955x-uart1-reg-defs.patch @@ -0,0 +1,11 @@ +--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h ++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +@@ -137,6 +137,8 @@ + #define QCA955X_GMAC_SIZE 0x40 + #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000) + #define QCA955X_WMAC_SIZE 0x20000 ++#define QCA955X_UART1_BASE (AR71XX_APB_BASE + 0x00500000) ++#define QCA955X_UART1_SIZE 0x14 + #define QCA955X_EHCI0_BASE 0x1b000000 + #define QCA955X_EHCI1_BASE 0x1b400000 + #define QCA955X_EHCI_SIZE 0x1000 From 8ccccdb831f8c8bd6b0c864c6417a56dc5dfc3cc Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 20 Jan 2019 05:37:57 +0300 Subject: [PATCH 065/146] select MACH_LIBREROUTERV1 by default --- target/linux/ar71xx/config-4.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 index 7f2689688e71c8..ac45683b4900f5 100644 --- a/target/linux/ar71xx/config-4.9 +++ b/target/linux/ar71xx/config-4.9 @@ -138,7 +138,7 @@ CONFIG_ATH79=y # CONFIG_ATH79_MACH_JWAP230 is not set # CONFIG_ATH79_MACH_KOALA is not set # CONFIG_ATH79_MACH_LAN_TURTLE is not set -# CONFIG_ATH79_MACH_LIBREROUTERV1 is not set +CONFIG_ATH79_MACH_LIBREROUTERV1=y # CONFIG_ATH79_MACH_LIMA is not set # CONFIG_ATH79_MACH_MC_MAC1200R is not set # CONFIG_ATH79_MACH_MR12 is not set From 89d4209acb2d7d74acc0d98ebc1fabc0a47fb6c8 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 22 Jan 2019 18:17:15 +0300 Subject: [PATCH 066/146] add .config and feeds to build LibreMesh firmware This is a only a starting point. --- configs/default_config | 128 +++++++++++++++++++++++++++++++++++++++++ feeds.conf.default | 4 ++ 2 files changed, 132 insertions(+) create mode 100644 configs/default_config diff --git a/configs/default_config b/configs/default_config new file mode 100644 index 00000000000000..8082ea21af4365 --- /dev/null +++ b/configs/default_config @@ -0,0 +1,128 @@ +CONFIG_TARGET_ar71xx=y +CONFIG_TARGET_ar71xx_generic=y +CONFIG_TARGET_ar71xx_generic_DEVICE_librerouter-v1=y +CONFIG_DEVEL=y +CONFIG_BUSYBOX_CUSTOM=y +CONFIG_BUSYBOX_CONFIG_DEVMEM=y +CONFIG_BUSYBOX_CONFIG_NC_SERVER=y +CONFIG_BWMNG_EXTENDEDSTATS=y +CONFIG_BWMNG_TIME=y +CONFIG_DOWNLOAD_FOLDER="~/openwrt_download_cache" +# CONFIG_FEED_luci is not set +# CONFIG_FEED_packages is not set +# CONFIG_FEED_routing is not set +# CONFIG_FEED_telephony is not set +CONFIG_KERNEL_DEVMEM=y +CONFIG_KMOD_BATMAN_ADV_BATMAN_V=y +CONFIG_KMOD_BATMAN_ADV_BLA=y +CONFIG_KMOD_BATMAN_ADV_DAT=y +CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y +CONFIG_KMOD_BATMAN_ADV_MCAST=y +CONFIG_PACKAGE_ALFRED_VIS=y +CONFIG_PACKAGE_alfred=y +CONFIG_PACKAGE_batctl=y +CONFIG_PACKAGE_bmx6=y +CONFIG_PACKAGE_bmx6-auto-gw-mode=y +CONFIG_PACKAGE_bmx6-json=y +CONFIG_PACKAGE_bmx6-sms=y +CONFIG_PACKAGE_bmx6-table=y +CONFIG_PACKAGE_bmx6-uci-config=y +CONFIG_PACKAGE_bwm-ng=y +# CONFIG_PACKAGE_dnsmasq is not set +CONFIG_PACKAGE_dnsmasq-dhcpv6=y +CONFIG_PACKAGE_dnsmasq-distributed-hosts=y +CONFIG_PACKAGE_dnsmasq-lease-share=y +CONFIG_PACKAGE_ebtables=y +CONFIG_PACKAGE_ethtool=y +CONFIG_PACKAGE_first-boot-wizard-daemon=y +CONFIG_PACKAGE_first-boot-wizard-gui=y +CONFIG_PACKAGE_ip-tiny=y +CONFIG_PACKAGE_iputils-ping=y +CONFIG_PACKAGE_iputils-ping6=y +CONFIG_PACKAGE_kmod-batman-adv=y +CONFIG_PACKAGE_kmod-crypto-crc32c=y +CONFIG_PACKAGE_kmod-crypto-hash=y +CONFIG_PACKAGE_kmod-dummy=y +CONFIG_PACKAGE_kmod-ebtables=y +CONFIG_PACKAGE_kmod-ebtables-ipv6=y +CONFIG_PACKAGE_kmod-ip6-tunnel=y +CONFIG_PACKAGE_kmod-iptunnel6=y +CONFIG_PACKAGE_kmod-lib-crc16=y +CONFIG_PACKAGE_kmod-lib-crc32c=y +CONFIG_PACKAGE_kmod-macvlan=y +CONFIG_PACKAGE_kmod-tun=y +CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y +CONFIG_PACKAGE_kmod-usb-ohci=y +CONFIG_PACKAGE_libiwinfo-lua=y +CONFIG_PACKAGE_liblua=y +CONFIG_PACKAGE_liblucihttp=y +CONFIG_PACKAGE_liblucihttp-lua=y +CONFIG_PACKAGE_libncurses=y +CONFIG_PACKAGE_libpcap=y +CONFIG_PACKAGE_libremap-agent=y +CONFIG_PACKAGE_librt=y +CONFIG_PACKAGE_libubox-lua=y +CONFIG_PACKAGE_libubus-lua=y +CONFIG_PACKAGE_libuci-lua=y +CONFIG_PACKAGE_lime-app=y +CONFIG_PACKAGE_lime-basic=y +CONFIG_PACKAGE_lime-debug=y +CONFIG_PACKAGE_lime-docs=y +CONFIG_PACKAGE_lime-docs-minimal=y +CONFIG_PACKAGE_lime-full=y +CONFIG_PACKAGE_lime-hwd-ground-routing=y +CONFIG_PACKAGE_lime-hwd-openwrt-wan=y +CONFIG_PACKAGE_lime-map-agent=y +CONFIG_PACKAGE_lime-proto-anygw=y +CONFIG_PACKAGE_lime-proto-batadv=y +CONFIG_PACKAGE_lime-proto-bmx6=y +CONFIG_PACKAGE_lime-proto-wan=y +CONFIG_PACKAGE_lime-system=y +CONFIG_PACKAGE_lime-webui=y +CONFIG_PACKAGE_lua=y +CONFIG_PACKAGE_luci=y +CONFIG_PACKAGE_luci-app-batman-adv=y +CONFIG_PACKAGE_luci-app-bmx6=y +CONFIG_PACKAGE_luci-app-firewall=y +CONFIG_PACKAGE_luci-app-lime-location=y +CONFIG_PACKAGE_luci-base=y +CONFIG_PACKAGE_luci-i18n-base-en=y +CONFIG_PACKAGE_luci-lib-dracula=y +CONFIG_PACKAGE_luci-lib-httpclient=y +CONFIG_PACKAGE_luci-lib-httpprotoutils=y +CONFIG_PACKAGE_luci-lib-ip=y +CONFIG_PACKAGE_luci-lib-jquery-1-4=y +CONFIG_PACKAGE_luci-lib-jquery-flot-0-8=y +CONFIG_PACKAGE_luci-lib-json=y +CONFIG_PACKAGE_luci-lib-jsonc=y +CONFIG_PACKAGE_luci-lib-libremap=y +CONFIG_PACKAGE_luci-lib-libremap-bmx6=y +CONFIG_PACKAGE_luci-lib-libremap-location=y +CONFIG_PACKAGE_luci-lib-libremap-system=y +CONFIG_PACKAGE_luci-lib-libremap-wireless=y +CONFIG_PACKAGE_luci-lib-nixio=y +CONFIG_PACKAGE_luci-mod-admin-full=y +CONFIG_PACKAGE_luci-mod-status=y +CONFIG_PACKAGE_luci-proto-ipv6=y +CONFIG_PACKAGE_luci-proto-ppp=y +CONFIG_PACKAGE_luci-theme-bootstrap=y +CONFIG_PACKAGE_mtr=y +CONFIG_PACKAGE_netperf=y +CONFIG_PACKAGE_pv=y +CONFIG_PACKAGE_rpcd=y +CONFIG_PACKAGE_rpcd-mod-rrdns=y +CONFIG_PACKAGE_safe-reboot=y +CONFIG_PACKAGE_smonit=y +CONFIG_PACKAGE_sprunge=y +CONFIG_PACKAGE_tcpdump-mini=y +CONFIG_PACKAGE_terminfo=y +CONFIG_PACKAGE_ubus-lime-batman-adv=y +CONFIG_PACKAGE_ubus-lime-bmx6=y +CONFIG_PACKAGE_ubus-lime-grondrouting=y +CONFIG_PACKAGE_ubus-lime-location=y +CONFIG_PACKAGE_ubus-lime-metrics=y +CONFIG_PACKAGE_ubus-lime-openairview=y +CONFIG_PACKAGE_ubus-lime-utils=y +CONFIG_PACKAGE_uhttpd=y +CONFIG_PACKAGE_uhttpd-mod-ubus=y +CONFIG_PACKAGE_watchping=y diff --git a/feeds.conf.default b/feeds.conf.default index 555c548cc305f0..73b3ffed33b166 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -2,3 +2,7 @@ src-git packages https://git.openwrt.org/feed/packages.git^5779614d267732fc382c1 src-git luci https://git.openwrt.org/project/luci.git^4d6d8bc5b0d7ee71c7b29b12e7e0c2e1e86cb268 src-git routing https://git.openwrt.org/feed/routing.git^bb156bf355b54236a52279522fabbec1e8dd7043 src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 + +src-git libremesh https://github.com/libremesh/lime-packages.git;master +src-git libremap https://github.com/libremap/libremap-agent-openwrt.git;master +src-git fbw https://github.com/libremesh/FirstBootWizard.git;master From a34e533da677232562790708901892060f46fe04 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Tue, 22 Jan 2019 18:29:17 +0300 Subject: [PATCH 067/146] add new wireless regulation specs for Vatican and Tanzania --- .../wireless-regdb/patches/900-tz.patch | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 package/firmware/wireless-regdb/patches/900-tz.patch diff --git a/package/firmware/wireless-regdb/patches/900-tz.patch b/package/firmware/wireless-regdb/patches/900-tz.patch new file mode 100644 index 00000000000000..8b3b79f176c0c1 --- /dev/null +++ b/package/firmware/wireless-regdb/patches/900-tz.patch @@ -0,0 +1,22 @@ +--- a/db.txt ++++ b/db.txt +@@ -1209,8 +1209,8 @@ country TW: DFS-FCC + (57000 - 66000 @ 2160), (40) + + country TZ: +- (2402 - 2482 @ 40), (20) +- (5735 - 5835 @ 80), (30) ++ (2402 - 2484 @ 40), (30) ++ (5150 - 5835 @ 80), (30) + + # Source: + # #914 / 06 Sep 2007: http://www.ucrf.gov.ua/uk/doc/nkrz/1196068874 + +@@ -1334,3 +1334,7 @@ country ZW: DFS-ETSI + (5250 - 5330 @ 80), (20), DFS, AUTO-BW + (5490 - 5710 @ 160), (27), DFS + ++country VA: ++ (2402 - 2484 @ 40), (30) ++ (5150 - 5835 @ 80), (30) + From 065a2bb60eda68ba6bd491515b8c340364a8c37c Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 22 Jan 2019 12:25:49 -0300 Subject: [PATCH 068/146] Disable CONFIG_DOWNLOAD_FOLDER by default CONFIG_DOWNLOAD_FOLDER is a very handy way of caching and sharing the source download. We should find a way of leting the user enable this and selecting the folder. --- configs/default_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index 8082ea21af4365..70f4bedef330d5 100644 --- a/configs/default_config +++ b/configs/default_config @@ -7,7 +7,7 @@ CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y -CONFIG_DOWNLOAD_FOLDER="~/openwrt_download_cache" +#CONFIG_DOWNLOAD_FOLDER="~/openwrt_download_cache" # CONFIG_FEED_luci is not set # CONFIG_FEED_packages is not set # CONFIG_FEED_routing is not set From 963ad37ad48bc6df0d3fdb2f9f9d0aeb64c3eaa9 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 22 Jan 2019 12:36:39 -0300 Subject: [PATCH 069/146] add build instructions in README.md --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000000000..40612ecf385b38 --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ + +## Build instructions + +You need gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, +unzip, gawk, getopt, subversion, libz-dev and libc headers installed. + +1. Run `./scripts/feeds update -a` to obtain all the latest package definitions +defined in feeds.conf.default +2. Run `./scripts/feeds install -a` to install symlinks for all obtained +packages into package/feeds/ +3. Run `cp configs/default_config .config` +4. Run `make` to build your firmware. From a28f13b4908a17f62e2b54ca0fb116168f85d21a Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 29 Jan 2019 23:12:45 -0300 Subject: [PATCH 070/146] uboot-envtools: add support for LibreRouter v1 Signed-off-by: Santiago Piccinini --- package/boot/uboot-envtools/files/ar71xx | 1 + 1 file changed, 1 insertion(+) diff --git a/package/boot/uboot-envtools/files/ar71xx b/package/boot/uboot-envtools/files/ar71xx index 2d9fcea1ac2f0b..e3cb0f89ac3b49 100644 --- a/package/boot/uboot-envtools/files/ar71xx +++ b/package/boot/uboot-envtools/files/ar71xx @@ -39,6 +39,7 @@ hornet-ub|\ hornet-ub-x2|\ jwap230|\ koala|\ +librerouter-v1|\ mr1750|\ mr1750v2|\ mr600|\ From be44174cc6256edb76e2df2b0daa6dada3f78a9e Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:14:43 -0300 Subject: [PATCH 071/146] remove commented CONFIG_DOWNLOAD_FOLDER This option is not used but generates confusion as it is different than the default diffconfig --- configs/default_config | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index 70f4bedef330d5..6afa6387774c0d 100644 --- a/configs/default_config +++ b/configs/default_config @@ -7,7 +7,6 @@ CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y -#CONFIG_DOWNLOAD_FOLDER="~/openwrt_download_cache" # CONFIG_FEED_luci is not set # CONFIG_FEED_packages is not set # CONFIG_FEED_routing is not set From 5ac7b20e0f5edf5650de876c59f11668f4148584 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:17:47 -0300 Subject: [PATCH 072/146] enable fft-eval from lime-packages master --- configs/default_config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configs/default_config b/configs/default_config index 6afa6387774c0d..d9606aec6cce40 100644 --- a/configs/default_config +++ b/configs/default_config @@ -12,12 +12,15 @@ CONFIG_BWMNG_TIME=y # CONFIG_FEED_routing is not set # CONFIG_FEED_telephony is not set CONFIG_KERNEL_DEVMEM=y +CONFIG_KERNEL_RELAY=y CONFIG_KMOD_BATMAN_ADV_BATMAN_V=y CONFIG_KMOD_BATMAN_ADV_BLA=y CONFIG_KMOD_BATMAN_ADV_DAT=y CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y CONFIG_KMOD_BATMAN_ADV_MCAST=y CONFIG_PACKAGE_ALFRED_VIS=y +CONFIG_PACKAGE_ATH_DEBUG=y +CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bmx6=y @@ -33,6 +36,7 @@ CONFIG_PACKAGE_dnsmasq-distributed-hosts=y CONFIG_PACKAGE_dnsmasq-lease-share=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y +CONFIG_PACKAGE_fft-eval=y CONFIG_PACKAGE_first-boot-wizard-daemon=y CONFIG_PACKAGE_first-boot-wizard-gui=y CONFIG_PACKAGE_ip-tiny=y From 483e541e6d74778d35a20ba188fa737a8f89dba3 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:18:46 -0300 Subject: [PATCH 073/146] deselect lime meta packages --- configs/default_config | 2 -- 1 file changed, 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index d9606aec6cce40..7e7f4574fe133e 100644 --- a/configs/default_config +++ b/configs/default_config @@ -68,11 +68,9 @@ CONFIG_PACKAGE_libubox-lua=y CONFIG_PACKAGE_libubus-lua=y CONFIG_PACKAGE_libuci-lua=y CONFIG_PACKAGE_lime-app=y -CONFIG_PACKAGE_lime-basic=y CONFIG_PACKAGE_lime-debug=y CONFIG_PACKAGE_lime-docs=y CONFIG_PACKAGE_lime-docs-minimal=y -CONFIG_PACKAGE_lime-full=y CONFIG_PACKAGE_lime-hwd-ground-routing=y CONFIG_PACKAGE_lime-hwd-openwrt-wan=y CONFIG_PACKAGE_lime-map-agent=y From 40ffd587b91f67ceeee93b849e948a041e1a000d Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:19:52 -0300 Subject: [PATCH 074/146] do not select bm6 by default --- configs/default_config | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/configs/default_config b/configs/default_config index 7e7f4574fe133e..2ad8dfa71c1c56 100644 --- a/configs/default_config +++ b/configs/default_config @@ -23,12 +23,6 @@ CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_batctl=y -CONFIG_PACKAGE_bmx6=y -CONFIG_PACKAGE_bmx6-auto-gw-mode=y -CONFIG_PACKAGE_bmx6-json=y -CONFIG_PACKAGE_bmx6-sms=y -CONFIG_PACKAGE_bmx6-table=y -CONFIG_PACKAGE_bmx6-uci-config=y CONFIG_PACKAGE_bwm-ng=y # CONFIG_PACKAGE_dnsmasq is not set CONFIG_PACKAGE_dnsmasq-dhcpv6=y @@ -76,14 +70,12 @@ CONFIG_PACKAGE_lime-hwd-openwrt-wan=y CONFIG_PACKAGE_lime-map-agent=y CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-batadv=y -CONFIG_PACKAGE_lime-proto-bmx6=y CONFIG_PACKAGE_lime-proto-wan=y CONFIG_PACKAGE_lime-system=y CONFIG_PACKAGE_lime-webui=y CONFIG_PACKAGE_lua=y CONFIG_PACKAGE_luci=y CONFIG_PACKAGE_luci-app-batman-adv=y -CONFIG_PACKAGE_luci-app-bmx6=y CONFIG_PACKAGE_luci-app-firewall=y CONFIG_PACKAGE_luci-app-lime-location=y CONFIG_PACKAGE_luci-base=y @@ -97,7 +89,6 @@ CONFIG_PACKAGE_luci-lib-jquery-flot-0-8=y CONFIG_PACKAGE_luci-lib-json=y CONFIG_PACKAGE_luci-lib-jsonc=y CONFIG_PACKAGE_luci-lib-libremap=y -CONFIG_PACKAGE_luci-lib-libremap-bmx6=y CONFIG_PACKAGE_luci-lib-libremap-location=y CONFIG_PACKAGE_luci-lib-libremap-system=y CONFIG_PACKAGE_luci-lib-libremap-wireless=y @@ -118,7 +109,6 @@ CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y CONFIG_PACKAGE_ubus-lime-batman-adv=y -CONFIG_PACKAGE_ubus-lime-bmx6=y CONFIG_PACKAGE_ubus-lime-grondrouting=y CONFIG_PACKAGE_ubus-lime-location=y CONFIG_PACKAGE_ubus-lime-metrics=y From 9bbe7615a3394ffbccdea9d79de6fc6387ad4f2e Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:21:32 -0300 Subject: [PATCH 075/146] deselect lime-webui --- configs/default_config | 2 -- 1 file changed, 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index 2ad8dfa71c1c56..6b018f3173c787 100644 --- a/configs/default_config +++ b/configs/default_config @@ -72,14 +72,12 @@ CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y CONFIG_PACKAGE_lime-system=y -CONFIG_PACKAGE_lime-webui=y CONFIG_PACKAGE_lua=y CONFIG_PACKAGE_luci=y CONFIG_PACKAGE_luci-app-batman-adv=y CONFIG_PACKAGE_luci-app-firewall=y CONFIG_PACKAGE_luci-app-lime-location=y CONFIG_PACKAGE_luci-base=y -CONFIG_PACKAGE_luci-i18n-base-en=y CONFIG_PACKAGE_luci-lib-dracula=y CONFIG_PACKAGE_luci-lib-httpclient=y CONFIG_PACKAGE_luci-lib-httpprotoutils=y From fe6d87e7bf95d314aa993f1e1c70cd2653e00d00 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 17:27:38 -0300 Subject: [PATCH 076/146] disable all CONFIG_FEED_* for the moment --- configs/default_config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configs/default_config b/configs/default_config index 6b018f3173c787..7941293898e046 100644 --- a/configs/default_config +++ b/configs/default_config @@ -7,6 +7,9 @@ CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y +# CONFIG_FEED_fbw is not set +# CONFIG_FEED_libremap is not set +# CONFIG_FEED_libremesh is not set # CONFIG_FEED_luci is not set # CONFIG_FEED_packages is not set # CONFIG_FEED_routing is not set From 1e686bb4ee9388efe08d93050cc224c3997ccb9f Mon Sep 17 00:00:00 2001 From: spiccinini Date: Sat, 16 Feb 2019 15:29:52 -0300 Subject: [PATCH 077/146] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000000000..dd84ea7824f11b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. From 70c692a3ad89f13cc329f4dc6b7d4d906325c731 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 18:16:06 -0300 Subject: [PATCH 078/146] deselect lime-map-agent --- configs/default_config | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index 7941293898e046..cfbe90c561f4f1 100644 --- a/configs/default_config +++ b/configs/default_config @@ -70,7 +70,6 @@ CONFIG_PACKAGE_lime-docs=y CONFIG_PACKAGE_lime-docs-minimal=y CONFIG_PACKAGE_lime-hwd-ground-routing=y CONFIG_PACKAGE_lime-hwd-openwrt-wan=y -CONFIG_PACKAGE_lime-map-agent=y CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y From fdd48aa684ba72ae0396f1bd890ca7b306c24941 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 18:21:44 -0300 Subject: [PATCH 079/146] remove dnsmasq from DEFAULT_PACKAGES --- configs/default_config | 1 - include/target.mk | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index cfbe90c561f4f1..7c4ffec5d83697 100644 --- a/configs/default_config +++ b/configs/default_config @@ -27,7 +27,6 @@ CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bwm-ng=y -# CONFIG_PACKAGE_dnsmasq is not set CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_dnsmasq-distributed-hosts=y CONFIG_PACKAGE_dnsmasq-lease-share=y diff --git a/include/target.mk b/include/target.mk index 53d7436311c0c7..45dd477aadb8f1 100644 --- a/include/target.mk +++ b/include/target.mk @@ -17,7 +17,7 @@ DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fs # For nas targets DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets -DEFAULT_PACKAGES.router:=dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload +DEFAULT_PACKAGES.router:=iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload DEFAULT_PACKAGES.bootloader:= ifneq ($(DUMP),) From 7e0dceb64f254912e4009430d9f92621d5d2d3d2 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:41:18 -0300 Subject: [PATCH 080/146] deselect luci admin full --- configs/default_config | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/configs/default_config b/configs/default_config index 7c4ffec5d83697..aee0e348029b71 100644 --- a/configs/default_config +++ b/configs/default_config @@ -45,15 +45,17 @@ CONFIG_PACKAGE_kmod-dummy=y CONFIG_PACKAGE_kmod-ebtables=y CONFIG_PACKAGE_kmod-ebtables-ipv6=y CONFIG_PACKAGE_kmod-ip6-tunnel=y +CONFIG_PACKAGE_kmod-ipt-nat=y CONFIG_PACKAGE_kmod-iptunnel6=y CONFIG_PACKAGE_kmod-lib-crc16=y CONFIG_PACKAGE_kmod-lib-crc32c=y CONFIG_PACKAGE_kmod-macvlan=y +CONFIG_PACKAGE_kmod-nf-conntrack=y +CONFIG_PACKAGE_kmod-nf-nat=y CONFIG_PACKAGE_kmod-tun=y CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y CONFIG_PACKAGE_kmod-usb-ohci=y CONFIG_PACKAGE_libiwinfo-lua=y -CONFIG_PACKAGE_liblua=y CONFIG_PACKAGE_liblucihttp=y CONFIG_PACKAGE_liblucihttp-lua=y CONFIG_PACKAGE_libncurses=y @@ -73,18 +75,10 @@ CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y CONFIG_PACKAGE_lime-system=y -CONFIG_PACKAGE_lua=y -CONFIG_PACKAGE_luci=y -CONFIG_PACKAGE_luci-app-batman-adv=y -CONFIG_PACKAGE_luci-app-firewall=y -CONFIG_PACKAGE_luci-app-lime-location=y CONFIG_PACKAGE_luci-base=y -CONFIG_PACKAGE_luci-lib-dracula=y CONFIG_PACKAGE_luci-lib-httpclient=y CONFIG_PACKAGE_luci-lib-httpprotoutils=y CONFIG_PACKAGE_luci-lib-ip=y -CONFIG_PACKAGE_luci-lib-jquery-1-4=y -CONFIG_PACKAGE_luci-lib-jquery-flot-0-8=y CONFIG_PACKAGE_luci-lib-json=y CONFIG_PACKAGE_luci-lib-jsonc=y CONFIG_PACKAGE_luci-lib-libremap=y @@ -92,11 +86,6 @@ CONFIG_PACKAGE_luci-lib-libremap-location=y CONFIG_PACKAGE_luci-lib-libremap-system=y CONFIG_PACKAGE_luci-lib-libremap-wireless=y CONFIG_PACKAGE_luci-lib-nixio=y -CONFIG_PACKAGE_luci-mod-admin-full=y -CONFIG_PACKAGE_luci-mod-status=y -CONFIG_PACKAGE_luci-proto-ipv6=y -CONFIG_PACKAGE_luci-proto-ppp=y -CONFIG_PACKAGE_luci-theme-bootstrap=y CONFIG_PACKAGE_mtr=y CONFIG_PACKAGE_netperf=y CONFIG_PACKAGE_pv=y From 7aaf11266ae86361e73ae137d8094eb7cb450d26 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:42:17 -0300 Subject: [PATCH 081/146] add DEVICE_TYPPE librerouter and remove breaking dependencies --- include/target.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/target.mk b/include/target.mk index 45dd477aadb8f1..31588efe943099 100644 --- a/include/target.mk +++ b/include/target.mk @@ -10,7 +10,7 @@ ifneq ($(__target_inc),1) __target_inc=1 # default device type -DEVICE_TYPE?=router +DEVICE_TYPE?=librerouter # Default packages - the really basic set DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd @@ -18,6 +18,7 @@ DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fs DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm # For router targets DEFAULT_PACKAGES.router:=iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload +DEFAULT_PACKAGES.librerouter:=iptables ip6tables DEFAULT_PACKAGES.bootloader:= ifneq ($(DUMP),) From b69944ca6ce2dc7b17462d6f2639f6fb1ceda489 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:42:41 -0300 Subject: [PATCH 082/146] add kmod-usb-storage and safe-upgade device dependencies --- target/linux/ar71xx/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index f030ed34c69b51..6dc8bb308e1655 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1391,7 +1391,7 @@ TARGET_DEVICES += fritz450e define Device/librerouter-v1 DEVICE_TITLE := LibreRouter v1 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage safe-upgrade BOARDNAME := LIBREROUTERV1 IMAGE_SIZE := 32384k KERNEL := kernel-bin | lzma | uImage lzma From 797f54ae6e975a27d9754859d198068c52489baa Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:43:07 -0300 Subject: [PATCH 083/146] use libremap-gent from libremesh github --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index 73b3ffed33b166..115d43309d9382 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -4,5 +4,5 @@ src-git routing https://git.openwrt.org/feed/routing.git^bb156bf355b54236a522795 src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 src-git libremesh https://github.com/libremesh/lime-packages.git;master -src-git libremap https://github.com/libremap/libremap-agent-openwrt.git;master +src-git libremap https://github.com/libremesh/libremap-agent.git;master src-git fbw https://github.com/libremesh/FirstBootWizard.git;master From 264b518933e5646b0b30bfa1d19cada1db7db2fd Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Feb 2019 21:44:23 -0300 Subject: [PATCH 084/146] select babeld --- configs/default_config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/default_config b/configs/default_config index aee0e348029b71..2df93b2d0c5aac 100644 --- a/configs/default_config +++ b/configs/default_config @@ -25,6 +25,7 @@ CONFIG_PACKAGE_ALFRED_VIS=y CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y +CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bwm-ng=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y @@ -72,6 +73,7 @@ CONFIG_PACKAGE_lime-docs-minimal=y CONFIG_PACKAGE_lime-hwd-ground-routing=y CONFIG_PACKAGE_lime-hwd-openwrt-wan=y CONFIG_PACKAGE_lime-proto-anygw=y +CONFIG_PACKAGE_lime-proto-babeld=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y CONFIG_PACKAGE_lime-system=y From e9e5506df900ad7b366db9c1fde4097c028ff250 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 17 Feb 2019 01:48:30 -0300 Subject: [PATCH 085/146] add kernel reset button support --- .../arch/mips/ath79/mach-librerouter-v1.c | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c index 602423a2372141..17083ecda59073 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -26,6 +26,7 @@ #include "dev-ap9x-pci.h" #include "dev-eth.h" #include "dev-leds-gpio.h" +#include "dev-gpio-buttons.h" #include "dev-m25p80.h" #include "dev-nfc.h" #include "dev-spi.h" @@ -38,6 +39,23 @@ #define LIBREROUTERV1_MAC1_OFFSET 0x6 #define LIBREROUTERV1_WMAC_CALDATA_OFFSET 0x1000 +#define LIBREROUTERV1_GPIO_BTN_RESET 17 + +#define LIBREROUTERV1_KEYS_POLL_INTERVAL 20 +#define LIBREROUTERV1_KEYS_DEBOUNCE_INTERVAL (3 * LIBREROUTERV1_KEYS_POLL_INTERVAL) + + +static struct gpio_keys_button librerouter_gpio_keys[] __initdata = { + { + .desc = "reset", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = LIBREROUTERV1_KEYS_DEBOUNCE_INTERVAL, + .gpio = LIBREROUTERV1_GPIO_BTN_RESET, + .active_low = 1, + } +}; + static struct mtd_partition librerouter_spi_partitions[] = { { .name = "uboot", @@ -219,6 +237,10 @@ static void __init librerouter_v1_setup(void) ath79_register_eth(1); + ath79_register_gpio_keys_polled(-1, LIBREROUTERV1_KEYS_POLL_INTERVAL, + ARRAY_SIZE(librerouter_gpio_keys), + librerouter_gpio_keys); + ath79_register_wmac(art + LIBREROUTERV1_WMAC_CALDATA_OFFSET, NULL); ath79_register_pci(); From 5a79938f216cfe9d20d94f75daa8b2e487f8fda8 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 26 Feb 2019 09:46:15 -0300 Subject: [PATCH 086/146] enable CONFIG_PACKAGE_ALFRED_BATHOSTS --- configs/default_config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/default_config b/configs/default_config index 2df93b2d0c5aac..947474bf26b9ac 100644 --- a/configs/default_config +++ b/configs/default_config @@ -3,6 +3,7 @@ CONFIG_TARGET_ar71xx_generic=y CONFIG_TARGET_ar71xx_generic_DEVICE_librerouter-v1=y CONFIG_DEVEL=y CONFIG_BUSYBOX_CUSTOM=y +CONFIG_ALFRED_NEEDS_lua=y CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y @@ -21,6 +22,7 @@ CONFIG_KMOD_BATMAN_ADV_BLA=y CONFIG_KMOD_BATMAN_ADV_DAT=y CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y CONFIG_KMOD_BATMAN_ADV_MCAST=y +CONFIG_PACKAGE_ALFRED_BATHOSTS=y CONFIG_PACKAGE_ALFRED_VIS=y CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_SPECTRAL=y From dfce6c57901dc9b9894ef55f3dcebf6ea6e57978 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 27 Feb 2019 13:53:08 -0300 Subject: [PATCH 087/146] enable busybox CROND_SPECIAL_TIMES @reboot, @hourly, etc --- configs/default_config | 1 + package/utils/busybox/config/miscutils/Config.in | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/configs/default_config b/configs/default_config index 947474bf26b9ac..dd41d6bab1ae77 100644 --- a/configs/default_config +++ b/configs/default_config @@ -5,6 +5,7 @@ CONFIG_DEVEL=y CONFIG_BUSYBOX_CUSTOM=y CONFIG_ALFRED_NEEDS_lua=y CONFIG_BUSYBOX_CONFIG_DEVMEM=y +CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in index 61c5458b637c6b..1b978195d89f33 100644 --- a/package/utils/busybox/config/miscutils/Config.in +++ b/package/utils/busybox/config/miscutils/Config.in @@ -157,6 +157,22 @@ config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL help Command output will be sent to corresponding user via email. +config BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES + bool "Support special times (@reboot, @daily, etc) in crontabs" + default BUSYBOX_DEFAULT_FEATURE_CROND_SPECIAL_TIMES + depends on BUSYBOX_CONFIG_CROND + help + string meaning + ------ ------- + @reboot Run once, at startup + @yearly Run once a year: "0 0 1 1 *" + @annually Same as @yearly: "0 0 1 1 *" + @monthly Run once a month: "0 0 1 * *" + @weekly Run once a week: "0 0 * * 0" + @daily Run once a day: "0 0 * * *" + @midnight Same as @daily: "0 0 * * *" + @hourly Run once an hour: "0 * * * *" + config BUSYBOX_CONFIG_FEATURE_CROND_DIR string "crond spool directory" default BUSYBOX_DEFAULT_FEATURE_CROND_DIR From 84ec293e227b230cafa26bb3f76aa2d6e9e99488 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 7 Mar 2019 18:25:31 -0300 Subject: [PATCH 088/146] use routing fork to test babeld-1.9-dev --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index 115d43309d9382..c47d3d354828f8 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^5779614d267732fc382c1684202543fdbd924b4c src-git luci https://git.openwrt.org/project/luci.git^4d6d8bc5b0d7ee71c7b29b12e7e0c2e1e86cb268 -src-git routing https://git.openwrt.org/feed/routing.git^bb156bf355b54236a52279522fabbec1e8dd7043 +src-git routing https://github.com/LibreRouterOrg/routing.git^e69b760e79a3f7543c3e459cb301a8b2e3d51056 src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 src-git libremesh https://github.com/libremesh/lime-packages.git;master From f6e4475d12f7f61644a9c68ec9e6838ecefd33fb Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 8 Mar 2019 12:45:12 -0300 Subject: [PATCH 089/146] ar71xx: fix librerouter switch config Not both ethernet ports (GMAC0/RGMII and GMAC1/SGMII) are working --- target/linux/ar71xx/base-files/etc/board.d/02_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index bbee12d3f29d4b..9ea83e781543fb 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -450,7 +450,7 @@ ar71xx_setup_interfaces() librerouter-v1) ucidef_set_interfaces_lan_wan "eth1.2" "eth0.1" ucidef_add_switch "switch0" \ - "0@eth0" "2:wan" "6@eth1" "1:lan" "3:lan" "4:lan" + "0@eth0" "5:wan" "6@eth1" "4:lan" ;; nanostation-m-xw) ucidef_add_switch "switch0" \ From bab3551c4b7b143fc5e670e66f7be023ce693e27 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 8 Mar 2019 14:46:08 -0300 Subject: [PATCH 090/146] fix 'use routing fork to test babeld-1.9-dev' hash --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index c47d3d354828f8..a0aebc120050e5 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^5779614d267732fc382c1684202543fdbd924b4c src-git luci https://git.openwrt.org/project/luci.git^4d6d8bc5b0d7ee71c7b29b12e7e0c2e1e86cb268 -src-git routing https://github.com/LibreRouterOrg/routing.git^e69b760e79a3f7543c3e459cb301a8b2e3d51056 +src-git routing https://github.com/LibreRouterOrg/routing.git^0da6524a370e2498d3e386a615b3e0151a012eaf src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 src-git libremesh https://github.com/libremesh/lime-packages.git;master From 3afe1b2416b07fc820de1187b74c89982f5cdeb0 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 8 Mar 2019 17:02:23 -0300 Subject: [PATCH 091/146] update first-boot-wizard package name --- configs/default_config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index dd41d6bab1ae77..a5961d3c6f7d66 100644 --- a/configs/default_config +++ b/configs/default_config @@ -37,8 +37,7 @@ CONFIG_PACKAGE_dnsmasq-lease-share=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y -CONFIG_PACKAGE_first-boot-wizard-daemon=y -CONFIG_PACKAGE_first-boot-wizard-gui=y +CONFIG_PACKAGE_first-boot-wizard=y CONFIG_PACKAGE_ip-tiny=y CONFIG_PACKAGE_iputils-ping=y CONFIG_PACKAGE_iputils-ping6=y From a1e1ecf59c508ef50ef5797e48d9aa4a4acc418a Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 10 Mar 2019 15:52:09 -0300 Subject: [PATCH 092/146] select shared-state --- configs/default_config | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index a5961d3c6f7d66..f95fa24e55a6ee 100644 --- a/configs/default_config +++ b/configs/default_config @@ -4,6 +4,7 @@ CONFIG_TARGET_ar71xx_generic_DEVICE_librerouter-v1=y CONFIG_DEVEL=y CONFIG_BUSYBOX_CUSTOM=y CONFIG_ALFRED_NEEDS_lua=y +CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y @@ -33,7 +34,6 @@ CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bwm-ng=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_dnsmasq-distributed-hosts=y -CONFIG_PACKAGE_dnsmasq-lease-share=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y @@ -96,6 +96,11 @@ CONFIG_PACKAGE_pv=y CONFIG_PACKAGE_rpcd=y CONFIG_PACKAGE_rpcd-mod-rrdns=y CONFIG_PACKAGE_safe-reboot=y +CONFIG_PACKAGE_shared-state=y +CONFIG_PACKAGE_shared-state-bat_hosts=y +CONFIG_PACKAGE_shared-state-date=y +CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y +CONFIG_PACKAGE_shared-state-dnsmasq_leases=y CONFIG_PACKAGE_smonit=y CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y From e925fe3ed675910500c8a8628a4461ad923d3189 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 12 Mar 2019 18:04:40 -0300 Subject: [PATCH 093/146] deselected smonit and dnsmasq-distributed-hosts --- configs/default_config | 2 -- 1 file changed, 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index f95fa24e55a6ee..712acf56ff7025 100644 --- a/configs/default_config +++ b/configs/default_config @@ -33,7 +33,6 @@ CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_bwm-ng=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y -CONFIG_PACKAGE_dnsmasq-distributed-hosts=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y @@ -101,7 +100,6 @@ CONFIG_PACKAGE_shared-state-bat_hosts=y CONFIG_PACKAGE_shared-state-date=y CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y CONFIG_PACKAGE_shared-state-dnsmasq_leases=y -CONFIG_PACKAGE_smonit=y CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y From 9f8b370246deb9394c77bf515152e68efaaa3109 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Mar 2019 15:45:17 -0300 Subject: [PATCH 094/146] default config with all partitions R/W Allow R/W to all partitions to ease migrations of bootloaders, changing MAC addresses, etc. This config is overrided by the bootloader's bootargs mtdparts --- .../linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c index 17083ecda59073..6d27883902f5d2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -61,12 +61,10 @@ static struct mtd_partition librerouter_spi_partitions[] = { .name = "uboot", .offset = 0, .size = 0x0040000, - .mask_flags = MTD_WRITEABLE, }, { .name = "uboot-env", .offset = 0x0040000, .size = 0x0010000, - .mask_flags = MTD_WRITEABLE, }, { .name = "firmware", .offset = 0x0050000, @@ -75,7 +73,6 @@ static struct mtd_partition librerouter_spi_partitions[] = { .name = "art", .offset = 0x0ff0000, .size = 0x0010000, - .mask_flags = MTD_WRITEABLE, } }; From d1bddf27cb7b313ae40c64668fa89319181eb728 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 16 Mar 2019 21:01:40 -0300 Subject: [PATCH 095/146] support librerouter v0 and v1 boards with v1 firmware --- target/linux/ar71xx/base-files/etc/board.d/02_network | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 9ea83e781543fb..a099105087e7f2 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -450,7 +450,7 @@ ar71xx_setup_interfaces() librerouter-v1) ucidef_set_interfaces_lan_wan "eth1.2" "eth0.1" ucidef_add_switch "switch0" \ - "0@eth0" "5:wan" "6@eth1" "4:lan" + "0@eth0" "5:wan" "6@eth1" "1:lan" "2:lan" "3:lan" "4:lan" ;; nanostation-m-xw) ucidef_add_switch "switch0" \ From 171b361718853a9bb2a378f9b726334f9a6c5ce6 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 23 Mar 2019 19:01:17 -0300 Subject: [PATCH 096/146] selected package ubus-lime-fbw --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 712acf56ff7025..e113bb7dd8a106 100644 --- a/configs/default_config +++ b/configs/default_config @@ -104,6 +104,7 @@ CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y CONFIG_PACKAGE_ubus-lime-batman-adv=y +CONFIG_PACKAGE_ubus-lime-fbw=y CONFIG_PACKAGE_ubus-lime-grondrouting=y CONFIG_PACKAGE_ubus-lime-location=y CONFIG_PACKAGE_ubus-lime-metrics=y From 5ce8301fbb2f63f288d1fecd5ca63da8812d11e9 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 27 Apr 2019 11:51:48 -0300 Subject: [PATCH 097/146] select uhttpd-mod-lua --- configs/default_config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/default_config b/configs/default_config index e113bb7dd8a106..878eee19535547 100644 --- a/configs/default_config +++ b/configs/default_config @@ -111,5 +111,7 @@ CONFIG_PACKAGE_ubus-lime-metrics=y CONFIG_PACKAGE_ubus-lime-openairview=y CONFIG_PACKAGE_ubus-lime-utils=y CONFIG_PACKAGE_uhttpd=y +CONFIG_PACKAGE_uhttpd-mod-lua=y CONFIG_PACKAGE_uhttpd-mod-ubus=y CONFIG_PACKAGE_watchping=y +CONFIG_uhttpd_lua=y From d59e1a4b186035cd52335cafc183fab845417ebc Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 27 Apr 2019 11:58:29 -0300 Subject: [PATCH 098/146] add lime-defaults-factory to overwrite the package file --- .gitignore | 1 - files/etc/config/lime-defaults-factory | 63 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 files/etc/config/lime-defaults-factory diff --git a/.gitignore b/.gitignore index 84e1a9d6d18c50..b79b51f388083d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ /logs /feeds /feeds.conf -/files /overlay /package/feeds /package/openwrt-packages diff --git a/files/etc/config/lime-defaults-factory b/files/etc/config/lime-defaults-factory new file mode 100644 index 00000000000000..28a9789097fa45 --- /dev/null +++ b/files/etc/config/lime-defaults-factory @@ -0,0 +1,63 @@ +# Beware this file is NOT supposed to be edited by the end user, modify /etc/config/lime instead +# If the same option or list is defined both in /etc/config/lime and lime-defaults file, the former will prevail +# Beware this file is not supposed to store interface specific configuration, like "config net eth0" + +# Read the documentation in /docs directory +# and on http://libremesh.org + +config lime system + option hostname 'LiMe-%M4%M5%M6' + option domain 'lan' + option keep_on_upgrade 'libremesh base-files-essential /etc/sysupgrade.conf' + +config lime network + option primary_interface 'eth0' + option main_ipv4_address '10.%N1.0.0/16' + option anygw_dhcp_start '2' + option anygw_dhcp_limit '0' + option main_ipv6_address '2a00:1508:0a%N1:%N200::/64' + option bmx6_mtu '1500' + option bmx7_mtu '1500' + list protocols ieee80211s + list protocols lan + list protocols anygw + list protocols batadv:%N1 + list protocols bmx6:13 + list protocols olsr:14 + list protocols olsr6:15 + list protocols olsr2:16 + list protocols babeld:17 + list protocols bmx7:18 + list resolvers 4.2.2.2 # b.resolvers.Level3.net + list resolvers 141.1.1.1 # cns1.cw.net + list resolvers 2001:470:20::2 # ordns.he.net + option bmx6_mtu '1500' + option bmx6_publish_ownip false + option bmx6_over_batman false + option bmx6_pref_gw none + option bmx6_wifi_rate_max 54000000 + option bmx7_publish_ownip false + option bmx7_over_batman false + option bmx7_pref_gw none + option bmx7_wifi_rate_max 'auto' + option anygw_mac "aa:aa:aa:%N1:%N2:aa" + option use_odhcpd false + +config lime wifi + option channel_2ghz '11' + list channel_5ghz '157' + list channel_5ghz '48' + option htmode_5ghz 'HT40' + option distance_2ghz '100' + option distance_5ghz '1000' + list modes 'ap' + list modes 'apname' + list modes 'ieee80211s' + option ap_ssid 'LibreMesh.org' + option apname_ssid 'LibreMesh.org/%H' + option adhoc_ssid 'LiMe' + option adhoc_bssid 'ca:fe:00:c0:ff:ee' + option adhoc_mcast_rate_2ghz '24000' + option adhoc_mcast_rate_5ghz '6000' + option ieee80211s_mesh_fwding '0' + option ieee80211s_mesh_id 'LiMe' From 0cb606f0293b257ec6cbf3b1013ae777ccfea82e Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 27 Apr 2019 11:59:19 -0300 Subject: [PATCH 099/146] change default 2.4GHz mode to AP only and 5.8GHz to mesh only The idea is that the backbone is only in 5.8GHz (at least for dual-band routers) and 2.4GHz is not part of the mesh providing local conectivity near to the node. --- files/etc/config/lime-defaults-factory | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/etc/config/lime-defaults-factory b/files/etc/config/lime-defaults-factory index 28a9789097fa45..05ad0a7f0a6ab2 100644 --- a/files/etc/config/lime-defaults-factory +++ b/files/etc/config/lime-defaults-factory @@ -50,9 +50,9 @@ config lime wifi option htmode_5ghz 'HT40' option distance_2ghz '100' option distance_5ghz '1000' - list modes 'ap' - list modes 'apname' - list modes 'ieee80211s' + list modes 'ap_2ghz' + list modes 'apname_2ghz' + list modes 'ieee80211s_5ghz' option ap_ssid 'LibreMesh.org' option apname_ssid 'LibreMesh.org/%H' option adhoc_ssid 'LiMe' From 7b2698a0cc68d762389ba34a504876e641eaab68 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 10:53:24 -0300 Subject: [PATCH 100/146] remove original README as it was cousing confusion --- README | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index 55ca92af65f8f5..00000000000000 --- a/README +++ /dev/null @@ -1,34 +0,0 @@ - _______ ________ __ - | |.-----.-----.-----.| | | |.----.| |_ - | - || _ | -__| || | | || _|| _| - |_______|| __|_____|__|__||________||__| |____| - |__| W I R E L E S S F R E E D O M - ----------------------------------------------------- - -This is the buildsystem for the OpenWrt Linux distribution. - -To build your own firmware you need a Linux, BSD or MacOSX system (case -sensitive filesystem required). Cygwin is unsupported because of the lack -of a case sensitive file system. - -You need gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, -unzip, gawk, getopt, subversion, libz-dev and libc headers installed. - -1. Run "./scripts/feeds update -a" to obtain all the latest package definitions -defined in feeds.conf / feeds.conf.default - -2. Run "./scripts/feeds install -a" to install symlinks for all obtained -packages into package/feeds/ - -3. Run "make menuconfig" to select your preferred configuration for the -toolchain, target system & firmware packages. - -4. Run "make" to build your firmware. This will download all sources, build -the cross-compile toolchain and then cross-compile the Linux kernel & all -chosen applications for your target system. - -Sunshine! - Your OpenWrt Community - http://www.openwrt.org - - From daa08ef4fbbfe43165eae08e70cfeaab5ec1c75e Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 10:54:13 -0300 Subject: [PATCH 101/146] Add development instructions --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/README.md b/README.md index 40612ecf385b38..b0758eeb0ea757 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,46 @@ defined in feeds.conf.default packages into package/feeds/ 3. Run `cp configs/default_config .config` 4. Run `make` to build your firmware. + + +## Development of LibreMesh packages + +To do work in libremesh packages you should make a clone of the repo and then +you can use this clone as part of the build using a local symbolic link. This way +you can change the files and run `make`. When you are satisfied by your changes you +should commit your changes to the lime-packages repo in a new branch and push this +to github and do a pull request. + +Fork the lime-packages repo in github and then clone it replacing yourgithubuser +``` +git clone git@github.com:yourgithubuser/lime-packages.git +``` + +Then edit feeds.conf.default and change the line + +``` +src-git libremesh https://github.com/libremesh/lime-packages.git;master +``` + +with this line replacing the path to repo and branch name (replace all the +line, check that src-git changed to src-link): + +``` +src-link libremesh /home/user/path/to/lime-packages +``` + +Run `./scripts/feeds update -a` and then `./scripts/feeds install -a` + +Now perform your changes to the lime-packages repo, editing files, etc. +If you are creating new packages you should run `feeds install -a` after you create +the package in order to be able to select the package with make menuconfig. + +When you want to create an image with your changes run `make`. If you need change +the package selection run `make menuconfig` and then `make`. + +## + +## Notes + +* You can speed up the build process using more CPUs, for example with `make -j3` +the build uses 3 CPUs. From 6f8b46098d83619d54bfb4518845c14c6bf37531 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 11:00:10 -0300 Subject: [PATCH 102/146] added docs notes --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b0758eeb0ea757..d8c490190ca7a6 100644 --- a/README.md +++ b/README.md @@ -47,9 +47,13 @@ the package in order to be able to select the package with make menuconfig. When you want to create an image with your changes run `make`. If you need change the package selection run `make menuconfig` and then `make`. -## ## Notes * You can speed up the build process using more CPUs, for example with `make -j3` the build uses 3 CPUs. +* For aditional documentation see + * https://openwrt.org/docs/guide-developer/build-system/use-buildsystem + * https://openwrt.org/docs/guide-developer/feeds + * https://openwrt.org/docs/guide-developer/packages + * https://openwrt.org/docs/guide-developer/start From e8293dbd55c9c72f190a3c5a0f74abb1eb949ae3 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 11:23:13 -0300 Subject: [PATCH 103/146] add more docs to the readme --- README.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/README.md b/README.md index d8c490190ca7a6..1184ca07bbea7c 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,73 @@ the package in order to be able to select the package with make menuconfig. When you want to create an image with your changes run `make`. If you need change the package selection run `make menuconfig` and then `make`. +## Testing a LibreMesh branch + +========================== +Testing a LibreMesh branch +========================== + + +Edit feeds.conf.default, for example to test the `add-fft-eval` branch: + +``` +diff --git a/feeds.conf.default b/feeds.conf.default +index 5a681c88c4..ee2c5f1223 100644 +--- a/feeds.conf.default ++++ b/feeds.conf.default +@@ -3,6 +3,6 @@ src-git luci https://git.openwrt.org/project/luci.git^f64b1523447547032d5280fb0b + src-git routing https://git.openwrt.org/feed/routing.git^1b9d1c419f0ecefda51922a7845ab2183d6acd76 + src-git telephony https://git.openwrt.org/feed/telephony.git^b9d7b321d15a44c5abb9e5d43a4ec78abfd9031b + +-src-git libremesh https://github.com/libremesh/lime-packages.git;master ++src-git libremesh https://github.com/libremesh/lime-packages.git;add-fft-eval + src-git libremap https://github.com/libremap/libremap-agent-openwrt.git;master + src-git fbw https://github.com/libremesh/FirstBootWizard.git;master +``` + +``` +$ ./scripts/feeds update -a +``` + +update the feed as new packages may have beed added to a feed +``` +$ ./scripts/feeds install -a +``` + +## Changing package and options selection + +The config documentation is here `https://openwrt.org/docs/guide-developer/build-system/use-buildsystem`. +Some tips: +* The config is stored in .config +* To change the config use `make manuconfig` +* To know the difference between two configs, for example from the current config (.config) and +the default configuration run `$ ./scripts/diffconfig.sh | diff configs/default_config -` +* To save the new config to a new file (for backup purposes, to add it to a git repo, etc) run +`$ ./scripts/diffconfig.sh > configs/your_config` +* To change the default configuration, for example to perform a pull request to `git@github.com:LibreRouterOrg/openwrt.git` run +`$ ./scripts/diffconfig.sh > configs/your_config` + + +## Upgrading the buildroot + +``` +$ git pull + +$ ./scripts/feeds update -a + +$ ./scripts/feeds install -a +``` + +Copy the new config, be aware that this overwrites you local config!! +``` +$ cp configs/default_config .config +``` + +``` +$ make defconfig +$ make -j4 +... +``` ## Notes From f09160816d49860a50eccd2fc93cfeec1678f7f9 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 11:24:05 -0300 Subject: [PATCH 104/146] fixed docs --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 1184ca07bbea7c..8e307f50350fa5 100644 --- a/README.md +++ b/README.md @@ -49,11 +49,6 @@ the package selection run `make menuconfig` and then `make`. ## Testing a LibreMesh branch -========================== -Testing a LibreMesh branch -========================== - - Edit feeds.conf.default, for example to test the `add-fft-eval` branch: ``` From ceb87f05b15fd1fe0f8f1c9f95ad59e73adb0a3b Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 16:23:16 -0300 Subject: [PATCH 105/146] remove fbw feed Remove as it is a libremesh package --- configs/default_config | 1 - feeds.conf.default | 1 - 2 files changed, 2 deletions(-) diff --git a/configs/default_config b/configs/default_config index 878eee19535547..18419f28fb45eb 100644 --- a/configs/default_config +++ b/configs/default_config @@ -10,7 +10,6 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y -# CONFIG_FEED_fbw is not set # CONFIG_FEED_libremap is not set # CONFIG_FEED_libremesh is not set # CONFIG_FEED_luci is not set diff --git a/feeds.conf.default b/feeds.conf.default index a0aebc120050e5..4ca45044478bff 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -5,4 +5,3 @@ src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a src-git libremesh https://github.com/libremesh/lime-packages.git;master src-git libremap https://github.com/libremesh/libremap-agent.git;master -src-git fbw https://github.com/libremesh/FirstBootWizard.git;master From f7c4052745ce107d933c8b8244befe32c855181a Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Tue, 14 May 2019 16:26:20 -0300 Subject: [PATCH 106/146] selected pirania-app, shared-state-pirania and shared-state-persist --- configs/default_config | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/configs/default_config b/configs/default_config index 18419f28fb45eb..495133b6c61b5d 100644 --- a/configs/default_config +++ b/configs/default_config @@ -30,6 +30,7 @@ CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y +CONFIG_PACKAGE_block-mount=y CONFIG_PACKAGE_bwm-ng=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_ebtables=y @@ -37,6 +38,8 @@ CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y CONFIG_PACKAGE_first-boot-wizard=y CONFIG_PACKAGE_ip-tiny=y +CONFIG_PACKAGE_ip6tables-mod-nat=y +CONFIG_PACKAGE_ipset=y CONFIG_PACKAGE_iputils-ping=y CONFIG_PACKAGE_iputils-ping6=y CONFIG_PACKAGE_kmod-batman-adv=y @@ -45,20 +48,32 @@ CONFIG_PACKAGE_kmod-crypto-hash=y CONFIG_PACKAGE_kmod-dummy=y CONFIG_PACKAGE_kmod-ebtables=y CONFIG_PACKAGE_kmod-ebtables-ipv6=y +CONFIG_PACKAGE_kmod-fs-vfat=y CONFIG_PACKAGE_kmod-ip6-tunnel=y +CONFIG_PACKAGE_kmod-ipt-conntrack=y +CONFIG_PACKAGE_kmod-ipt-ipset=y CONFIG_PACKAGE_kmod-ipt-nat=y +CONFIG_PACKAGE_kmod-ipt-nat6=y CONFIG_PACKAGE_kmod-iptunnel6=y CONFIG_PACKAGE_kmod-lib-crc16=y CONFIG_PACKAGE_kmod-lib-crc32c=y CONFIG_PACKAGE_kmod-macvlan=y CONFIG_PACKAGE_kmod-nf-conntrack=y +CONFIG_PACKAGE_kmod-nf-conntrack6=y CONFIG_PACKAGE_kmod-nf-nat=y +CONFIG_PACKAGE_kmod-nf-nat6=y +CONFIG_PACKAGE_kmod-nfnetlink=y +CONFIG_PACKAGE_kmod-nls-cp437=y +CONFIG_PACKAGE_kmod-nls-iso8859-1=y +CONFIG_PACKAGE_kmod-nls-utf8=y CONFIG_PACKAGE_kmod-tun=y CONFIG_PACKAGE_kmod-usb-ledtrig-usbport=y CONFIG_PACKAGE_kmod-usb-ohci=y +CONFIG_PACKAGE_libipset=y CONFIG_PACKAGE_libiwinfo-lua=y CONFIG_PACKAGE_liblucihttp=y CONFIG_PACKAGE_liblucihttp-lua=y +CONFIG_PACKAGE_libmnl=y CONFIG_PACKAGE_libncurses=y CONFIG_PACKAGE_libpcap=y CONFIG_PACKAGE_libremap-agent=y @@ -90,6 +105,8 @@ CONFIG_PACKAGE_luci-lib-libremap-wireless=y CONFIG_PACKAGE_luci-lib-nixio=y CONFIG_PACKAGE_mtr=y CONFIG_PACKAGE_netperf=y +CONFIG_PACKAGE_pirania=y +CONFIG_PACKAGE_pirania-app=y CONFIG_PACKAGE_pv=y CONFIG_PACKAGE_rpcd=y CONFIG_PACKAGE_rpcd-mod-rrdns=y @@ -99,6 +116,8 @@ CONFIG_PACKAGE_shared-state-bat_hosts=y CONFIG_PACKAGE_shared-state-date=y CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y CONFIG_PACKAGE_shared-state-dnsmasq_leases=y +CONFIG_PACKAGE_shared-state-persist=y +CONFIG_PACKAGE_shared-state-pirania=y CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y From 1b0c8c6ef95e56370b2369c859037299c6b57b37 Mon Sep 17 00:00:00 2001 From: spiccinini Date: Sat, 18 May 2019 17:13:49 -0300 Subject: [PATCH 107/146] Fix docs in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8e307f50350fa5..cb55661747e0f1 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ the default configuration run `$ ./scripts/diffconfig.sh | diff configs/default * To save the new config to a new file (for backup purposes, to add it to a git repo, etc) run `$ ./scripts/diffconfig.sh > configs/your_config` * To change the default configuration, for example to perform a pull request to `git@github.com:LibreRouterOrg/openwrt.git` run -`$ ./scripts/diffconfig.sh > configs/your_config` +`$ ./scripts/diffconfig.sh > configs/default_config` ## Upgrading the buildroot From bca406d5e5152a02db3cb88f2ff301acdc258845 Mon Sep 17 00:00:00 2001 From: Ilario Gelmetti Date: Sun, 26 May 2019 12:22:37 +0200 Subject: [PATCH 108/146] default_config explicitly unset dnsmasq, useful when compiling on openwrt trunk --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 495133b6c61b5d..cb8cb8ea3b2bc1 100644 --- a/configs/default_config +++ b/configs/default_config @@ -32,6 +32,7 @@ CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_block-mount=y CONFIG_PACKAGE_bwm-ng=y +# CONFIG_PACKAGE_dnsmasq is not set CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y From b65493a6f5719483779b48412a93e0ce0c55e615 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 29 May 2019 17:17:19 -0300 Subject: [PATCH 109/146] add minodo.info and meuno.info aliases to thisnode.info --- files/etc/config/uci-defaults/96-thisnode-info-translation | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 files/etc/config/uci-defaults/96-thisnode-info-translation diff --git a/files/etc/config/uci-defaults/96-thisnode-info-translation b/files/etc/config/uci-defaults/96-thisnode-info-translation new file mode 100755 index 00000000000000..f158041968fb75 --- /dev/null +++ b/files/etc/config/uci-defaults/96-thisnode-info-translation @@ -0,0 +1,2 @@ +#!/bin/sh +sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/minodo.info/|/meuno.info/|}' /etc/config/dhcp From 19a8c07dd228443f4ec84ff36ea4f3577852fe37 Mon Sep 17 00:00:00 2001 From: spiccinini Date: Thu, 6 Jun 2019 14:18:01 -0300 Subject: [PATCH 110/146] update routing feed: "Fix babeld interface configuration in init script" --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index 4ca45044478bff..4e3a4612173cd9 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^5779614d267732fc382c1684202543fdbd924b4c src-git luci https://git.openwrt.org/project/luci.git^4d6d8bc5b0d7ee71c7b29b12e7e0c2e1e86cb268 -src-git routing https://github.com/LibreRouterOrg/routing.git^0da6524a370e2498d3e386a615b3e0151a012eaf +src-git routing https://github.com/LibreRouterOrg/routing.git^d72af94632b875fe2b55b2f91a55375cf8c2657d src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 src-git libremesh https://github.com/libremesh/lime-packages.git;master From 15a615d3adddb477358ebf514bece627cde14cbf Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 7 Jun 2019 12:25:37 -0300 Subject: [PATCH 111/146] fix 96-thisnode-info-translation sed: bad option in substitution expression --- files/etc/config/uci-defaults/96-thisnode-info-translation | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/etc/config/uci-defaults/96-thisnode-info-translation b/files/etc/config/uci-defaults/96-thisnode-info-translation index f158041968fb75..f8bacb0e5727d8 100755 --- a/files/etc/config/uci-defaults/96-thisnode-info-translation +++ b/files/etc/config/uci-defaults/96-thisnode-info-translation @@ -1,2 +1,3 @@ #!/bin/sh -sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/minodo.info/|/meuno.info/|}' /etc/config/dhcp +sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/minodo.info/|}' /etc/config/dhcp +sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/meuno.info/|}' /etc/config/dhcp From ddca03c8ab0f878d99e513ee0168f81cb3abff11 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 7 Jun 2019 12:26:36 -0300 Subject: [PATCH 112/146] fix uci-defaults inside /etc/config instead of /etc --- files/etc/{config => }/uci-defaults/96-thisnode-info-translation | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename files/etc/{config => }/uci-defaults/96-thisnode-info-translation (100%) diff --git a/files/etc/config/uci-defaults/96-thisnode-info-translation b/files/etc/uci-defaults/96-thisnode-info-translation similarity index 100% rename from files/etc/config/uci-defaults/96-thisnode-info-translation rename to files/etc/uci-defaults/96-thisnode-info-translation From 2f0f80d09d4ec807286ae8ed205a28f487b94f60 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 7 Jun 2019 12:45:32 -0300 Subject: [PATCH 113/146] change default firmware partition size to dual partition size Change the size of the firmware partition from 16000kB to 7936kB. This size is the same used by the bootloader. The rationale behind this change is that if for any reason the boot process doesn't use the correct partitions provided by the bootloader in mtdparts then this size will be used and with a 16000kB size (only one big partiton) default then the image will boot and jffs2 will corrupt the "stable" partition. --- target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c index 6d27883902f5d2..1aff5cf2fccd1f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-librerouter-v1.c @@ -68,7 +68,7 @@ static struct mtd_partition librerouter_spi_partitions[] = { }, { .name = "firmware", .offset = 0x0050000, - .size = 0x0fa0000, + .size = 0x07c0000, }, { .name = "art", .offset = 0x0ff0000, From 32867c88b2bb338f865e0c58985de4d6b4e48afc Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 7 Jun 2019 15:59:27 -0300 Subject: [PATCH 114/146] update routing feed with babeld init fixes --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index 4e3a4612173cd9..3a264e150fc92e 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^5779614d267732fc382c1684202543fdbd924b4c src-git luci https://git.openwrt.org/project/luci.git^4d6d8bc5b0d7ee71c7b29b12e7e0c2e1e86cb268 -src-git routing https://github.com/LibreRouterOrg/routing.git^d72af94632b875fe2b55b2f91a55375cf8c2657d +src-git routing https://github.com/LibreRouterOrg/routing.git^d14caf1e6ba61a53624af199cfa90fc28311ea57 src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 src-git libremesh https://github.com/libremesh/lime-packages.git;master From 9dcd9a739263871d84b196a0d9d59ad26cb266fe Mon Sep 17 00:00:00 2001 From: patogit Date: Fri, 7 Jun 2019 21:21:33 -0500 Subject: [PATCH 115/146] add time as a dependency and clarify make menu process --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cb55661747e0f1..23af3c5cce4a3a 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,17 @@ ## Build instructions -You need gcc, binutils, bzip2, flex, python, perl, make, find, grep, diff, -unzip, gawk, getopt, subversion, libz-dev and libc headers installed. +Dependencies: You must have installed: gcc, binutils, bzip2, flex, python, +perl, make, find, grep, diff, unzip, gawk, getopt, subversion, time, +libz-dev (or zlib) and libc headers. 1. Run `./scripts/feeds update -a` to obtain all the latest package definitions defined in feeds.conf.default 2. Run `./scripts/feeds install -a` to install symlinks for all obtained packages into package/feeds/ 3. Run `cp configs/default_config .config` -4. Run `make` to build your firmware. +4. Run `make` to build your firmware. After choosing the options in the ncurses +menu, choose Exit and then Yes when asked if you want to save. ## Development of LibreMesh packages From d2282e29b0888dfa272149d845f48b202ec61b6f Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 15 Jun 2019 13:18:34 -0300 Subject: [PATCH 116/146] http redirect / to /app by default --- files/www/index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 files/www/index.html diff --git a/files/www/index.html b/files/www/index.html new file mode 100644 index 00000000000000..c0a2a9a92f2cf5 --- /dev/null +++ b/files/www/index.html @@ -0,0 +1,11 @@ + + + + + + + + +LiMe-App + + From 4dbcc21f7708d8c3d7c3f2e3351a7e68c334a112 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sat, 15 Jun 2019 15:36:36 -0300 Subject: [PATCH 117/146] remove translation of thisnode.info in uci-defaults This doesn't work well as when the config is regenerated this won't run again. It must be implemented in another way. --- files/etc/uci-defaults/96-thisnode-info-translation | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 files/etc/uci-defaults/96-thisnode-info-translation diff --git a/files/etc/uci-defaults/96-thisnode-info-translation b/files/etc/uci-defaults/96-thisnode-info-translation deleted file mode 100755 index f8bacb0e5727d8..00000000000000 --- a/files/etc/uci-defaults/96-thisnode-info-translation +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/minodo.info/|}' /etc/config/dhcp -sed -i '\|/thisnode.info/|{p;s|/thisnode.info/|/meuno.info/|}' /etc/config/dhcp From 533bc65bb2a7b1f33f57f32c267d741bbf85a558 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Mon, 17 Jun 2019 13:33:19 -0300 Subject: [PATCH 118/146] select hotplug-initd-services --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index cb8cb8ea3b2bc1..7b59f9d33b37ae 100644 --- a/configs/default_config +++ b/configs/default_config @@ -38,6 +38,7 @@ CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y CONFIG_PACKAGE_fft-eval=y CONFIG_PACKAGE_first-boot-wizard=y +CONFIG_PACKAGE_hotplug-initd-services=y CONFIG_PACKAGE_ip-tiny=y CONFIG_PACKAGE_ip6tables-mod-nat=y CONFIG_PACKAGE_ipset=y From ac929cfaf5649e60c71be3fba1a3b65b3485d49e Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Mon, 17 Jun 2019 13:33:39 -0300 Subject: [PATCH 119/146] select shared-state-babeld_hosts --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 7b59f9d33b37ae..731b39a6df1cc4 100644 --- a/configs/default_config +++ b/configs/default_config @@ -114,6 +114,7 @@ CONFIG_PACKAGE_rpcd=y CONFIG_PACKAGE_rpcd-mod-rrdns=y CONFIG_PACKAGE_safe-reboot=y CONFIG_PACKAGE_shared-state=y +CONFIG_PACKAGE_shared-state-babeld_hosts=y CONFIG_PACKAGE_shared-state-bat_hosts=y CONFIG_PACKAGE_shared-state-date=y CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y From b06a4dd95e89c073712bd9d4fa0c5ce5276220b6 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Mon, 17 Jun 2019 13:34:06 -0300 Subject: [PATCH 120/146] select missing luci-lib-libremap-babeld --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 731b39a6df1cc4..c61ebbcdb734f6 100644 --- a/configs/default_config +++ b/configs/default_config @@ -101,6 +101,7 @@ CONFIG_PACKAGE_luci-lib-ip=y CONFIG_PACKAGE_luci-lib-json=y CONFIG_PACKAGE_luci-lib-jsonc=y CONFIG_PACKAGE_luci-lib-libremap=y +CONFIG_PACKAGE_luci-lib-libremap-babeld=y CONFIG_PACKAGE_luci-lib-libremap-location=y CONFIG_PACKAGE_luci-lib-libremap-system=y CONFIG_PACKAGE_luci-lib-libremap-wireless=y From db3c9755a6de64444ecd242afdb2783de35fee99 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Mon, 17 Jun 2019 13:34:25 -0300 Subject: [PATCH 121/146] remove shared-state-date --- configs/default_config | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index c61ebbcdb734f6..76ffcb269450fc 100644 --- a/configs/default_config +++ b/configs/default_config @@ -117,7 +117,6 @@ CONFIG_PACKAGE_safe-reboot=y CONFIG_PACKAGE_shared-state=y CONFIG_PACKAGE_shared-state-babeld_hosts=y CONFIG_PACKAGE_shared-state-bat_hosts=y -CONFIG_PACKAGE_shared-state-date=y CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y CONFIG_PACKAGE_shared-state-dnsmasq_leases=y CONFIG_PACKAGE_shared-state-persist=y From 767b9e5a71dbd9bbbbfe6fd111f5bcd920e57d1f Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Mon, 17 Jun 2019 13:34:59 -0300 Subject: [PATCH 122/146] select check-date-http package --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 76ffcb269450fc..ad4ed6c3a9e6eb 100644 --- a/configs/default_config +++ b/configs/default_config @@ -33,6 +33,7 @@ CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_block-mount=y CONFIG_PACKAGE_bwm-ng=y # CONFIG_PACKAGE_dnsmasq is not set +CONFIG_PACKAGE_check-date-http=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y From 2105dcf2b385b2a4bbaf8b533467a7642e5781f4 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 12 Jul 2019 11:51:25 +0200 Subject: [PATCH 123/146] deselect alfred --- configs/default_config | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configs/default_config b/configs/default_config index ad4ed6c3a9e6eb..d6efc44ca2cae3 100644 --- a/configs/default_config +++ b/configs/default_config @@ -3,7 +3,6 @@ CONFIG_TARGET_ar71xx_generic=y CONFIG_TARGET_ar71xx_generic_DEVICE_librerouter-v1=y CONFIG_DEVEL=y CONFIG_BUSYBOX_CUSTOM=y -CONFIG_ALFRED_NEEDS_lua=y CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y CONFIG_BUSYBOX_CONFIG_DEVMEM=y CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y @@ -23,11 +22,8 @@ CONFIG_KMOD_BATMAN_ADV_BLA=y CONFIG_KMOD_BATMAN_ADV_DAT=y CONFIG_KMOD_BATMAN_ADV_DEBUGFS=y CONFIG_KMOD_BATMAN_ADV_MCAST=y -CONFIG_PACKAGE_ALFRED_BATHOSTS=y -CONFIG_PACKAGE_ALFRED_VIS=y CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_SPECTRAL=y -CONFIG_PACKAGE_alfred=y CONFIG_PACKAGE_babeld=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_block-mount=y From 2124be828153238c65196cb0ef8a19e2b090641a Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 1 Aug 2019 18:02:48 +0200 Subject: [PATCH 124/146] add userspace watchdog support As 18.06 does not have support of gpio-watchdog in kernel then a 'user space only' tool, om-watchdog, is used. --- configs/default_config | 1 + package/kernel/om-watchdog/files/om-watchdog.init | 3 +++ target/linux/ar71xx/image/generic.mk | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index d6efc44ca2cae3..cd69f8ed10484b 100644 --- a/configs/default_config +++ b/configs/default_config @@ -105,6 +105,7 @@ CONFIG_PACKAGE_luci-lib-libremap-wireless=y CONFIG_PACKAGE_luci-lib-nixio=y CONFIG_PACKAGE_mtr=y CONFIG_PACKAGE_netperf=y +CONFIG_PACKAGE_om-watchdog=y CONFIG_PACKAGE_pirania=y CONFIG_PACKAGE_pirania-app=y CONFIG_PACKAGE_pv=y diff --git a/package/kernel/om-watchdog/files/om-watchdog.init b/package/kernel/om-watchdog/files/om-watchdog.init index 10eb55ccc27f2a..0d90deacb8c0c6 100644 --- a/package/kernel/om-watchdog/files/om-watchdog.init +++ b/package/kernel/om-watchdog/files/om-watchdog.init @@ -26,6 +26,9 @@ get_gpio() { "mr600v2") return 15 ;; + "librerouter-v1") + return 2 + ;; "om2p"|\ "om2p-hs"|\ "om2p-hsv2"|\ diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 6dc8bb308e1655..0d1018c66df444 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1391,7 +1391,7 @@ TARGET_DEVICES += fritz450e define Device/librerouter-v1 DEVICE_TITLE := LibreRouter v1 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage safe-upgrade + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage safe-upgrade om-watchdog BOARDNAME := LIBREROUTERV1 IMAGE_SIZE := 32384k KERNEL := kernel-bin | lzma | uImage lzma From 4d606a58bd389a3c63706ba972b4130d56c90fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Pace?= Date: Mon, 2 Sep 2019 05:17:23 -0300 Subject: [PATCH 125/146] selects the shared-state-nodes_and_links package this is a required package to be able to see the community map in the lime-app. --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index cd69f8ed10484b..41524e0ed74594 100644 --- a/configs/default_config +++ b/configs/default_config @@ -119,6 +119,7 @@ CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y CONFIG_PACKAGE_shared-state-dnsmasq_leases=y CONFIG_PACKAGE_shared-state-persist=y CONFIG_PACKAGE_shared-state-pirania=y +CONFIG_PACKAGE_shared-state-nodes_and_links=y CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y From 47fd2b1684dc877a2b7eac8e31a9a43fdfb43a54 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Sun, 15 Sep 2019 20:28:10 -0300 Subject: [PATCH 126/146] update routing to babeld-1.9.1 --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index 3a264e150fc92e..d2e13059e76125 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -1,6 +1,6 @@ src-git packages https://git.openwrt.org/feed/packages.git^5779614d267732fc382c1684202543fdbd924b4c src-git luci https://git.openwrt.org/project/luci.git^4d6d8bc5b0d7ee71c7b29b12e7e0c2e1e86cb268 -src-git routing https://github.com/LibreRouterOrg/routing.git^d14caf1e6ba61a53624af199cfa90fc28311ea57 +src-git routing https://github.com/LibreRouterOrg/routing.git^2aa1506714d28704234998808249907a8289d945 src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 src-git libremesh https://github.com/libremesh/lime-packages.git;master From 97083d1a46f6ca1857d7d9308b3cd14977ef85b3 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sat, 11 Aug 2018 17:12:01 +0200 Subject: [PATCH 127/146] firmware-utils: tplink-safeloader: Add CPE210 v3 Add TP-Link CPE210 v3 to the support list. Its identical to the v2. Signed-off-by: Robert Marko --- tools/firmware-utils/src/tplink-safeloader.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 4b227e1c97b6c5..01885683c31cd5 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -155,7 +155,7 @@ static struct device_info boards[] = { .last_sysupgrade_partition = "support-list", }, - /** Firmware layout for the CPE210 V2 */ + /** Firmware layout for the CPE210 V2 and V3 */ { .id = "CPE210V2", .vendor = "CPE210(TP-LINK|UN|N300-2|00000000):2.0\r\n", @@ -170,7 +170,11 @@ static struct device_info boards[] = { "CPE210(TP-LINK|US|N300-2|55530000):2.0\r\n" "CPE210(TP-LINK|UN|N300-2):2.0\r\n" "CPE210(TP-LINK|EU|N300-2):2.0\r\n" - "CPE210(TP-LINK|US|N300-2):2.0\r\n", + "CPE210(TP-LINK|US|N300-2):2.0\r\n" + "CPE210(TP-LINK|EU|N300-2|45550000):3.0\r\n" + "CPE210(TP-LINK|UN|N300-2|00000000):3.0\r\n" + "CPE210(TP-LINK|UN|N300-2):3.0\r\n" + "CPE210(TP-LINK|EU|N300-2):3.0\r\n", .support_trail = '\xff', .soft_ver = NULL, From 9fac332dca9a8bd7c52fcec3512ea4b1cd9251de Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Sat, 11 Aug 2018 17:32:48 +0200 Subject: [PATCH 128/146] ar71xx: Add support for TP-Link CPE210 v3 ar71xx: Add support for TP-Link CPE210 v3. Looks identical to the v2. This PR adds support for a popular low-cost 2.4GHz N based AP Specifications: - SoC: Qualcomm Atheros QCA9533 (650MHz) - RAM: 64MB - Storage: 8 MB SPI NOR - Wireless: 2.4GHz N based built into SoC 2x2 - Ethernet: 1x 100/10 Mbps, integrated into SoC, 24V POE IN Installation: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 4-5 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP adress:192.168.0.254 Signed-off-by: Robert Marko --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 +++- target/linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 4 ++++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++- target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c | 3 +++ target/linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/generic-tp-link.mk | 7 +++++++ 7 files changed, 21 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 23f3d23bf53883..e0222f3637b60b 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -249,6 +249,7 @@ cf-e530n) ;; cpe210|\ cpe210-v2|\ +cpe210-v3|\ cpe510|\ wbs210|\ wbs510) @@ -259,7 +260,8 @@ wbs510) ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "tp-link:green:link4" "wlan0" "76" "100" "-75" "13" case "$board" in - cpe210-v2) + cpe210-v2|\ + cpe210-v3) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan0" "eth0" ;; *) diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index a099105087e7f2..5c0b7582124218 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -75,6 +75,7 @@ ar71xx_setup_interfaces() cf-e380ac-v1|\ cf-e380ac-v2|\ cpe210-v2|\ + cpe210-v3|\ dr342|\ eap120|\ eap300v2|\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 48b456c293b1dd..29cec2d8be712b 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -583,6 +583,10 @@ ar71xx_board_detect() { name="cpe210-v2" tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)" ;; + *"CPE210 v3") + name="cpe210-v3" + tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)" + ;; *"CPE505N") name="cpe505n" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 242c30906b23f1..bf80a612fc756d 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -588,7 +588,8 @@ platform_check_image() { tplink_pharos_check_image "$1" "7f454c46" "$(tplink_pharos_get_model_string)" '' && return 0 return 1 ;; - cpe210-v2) + cpe210-v2|\ + cpe210-v3) tplink_pharos_check_image "$1" "01000000" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0 return 1 ;; diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c index ceb1769ddd522d..16efbc8802ab96 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c @@ -236,6 +236,9 @@ MIPS_MACHINE(ATH79_MACH_CPE210, "CPE210", "TP-LINK CPE210/220", MIPS_MACHINE(ATH79_MACH_CPE210_V2, "CPE210V2", "TP-LINK CPE210 v2", cpe210_v2_setup); +MIPS_MACHINE(ATH79_MACH_CPE210_V3, "CPE210V3", "TP-LINK CPE210 v3", + cpe210_v2_setup); + MIPS_MACHINE(ATH79_MACH_CPE510, "CPE510", "TP-LINK CPE510/520", cpe510_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 8f329768888448..c047a0a40a12c2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -75,6 +75,7 @@ enum ath79_mach_type { ATH79_MACH_CF_E530N, /* COMFAST CF-E530N */ ATH79_MACH_CPE210, /* TP-LINK CPE210 v1 */ ATH79_MACH_CPE210_V2, /* TP-LINK CPE210 v2 */ + ATH79_MACH_CPE210_V3, /* TP-LINK CPE210 v3 */ ATH79_MACH_CPE505N, /* P&W CPE505N */ ATH79_MACH_CPE510, /* TP-LINK CPE510 */ ATH79_MACH_CPE830, /* YunCore CPE830 */ diff --git a/target/linux/ar71xx/image/generic-tp-link.mk b/target/linux/ar71xx/image/generic-tp-link.mk index daf6c35ae4610d..2a6faa54dbe07d 100644 --- a/target/linux/ar71xx/image/generic-tp-link.mk +++ b/target/linux/ar71xx/image/generic-tp-link.mk @@ -195,6 +195,13 @@ define Device/cpe210-v2 endef TARGET_DEVICES += cpe210-v2 +define Device/cpe210-v3 + $(Device/cpe210-v2) + DEVICE_TITLE := TP-LINK CPE210 v3 + BOARDNAME := CPE210V3 +endef +TARGET_DEVICES += cpe210-v3 + define Device/wbs210-v1 $(Device/cpe510-520-v1) DEVICE_TITLE := TP-LINK WBS210 v1 From fbe7e86c3c04c0b2dd25316129b1c426a29a53f0 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Mon, 7 Oct 2019 18:26:08 -0300 Subject: [PATCH 129/146] ar71xx: add TP-LINK CPE510 V2.0 profile Based on the work of Andrew Cameron at: https://github.com/aredn/aredn_ar71xx/commit/700f020e255abfd9ef8a0b2cfe9d82aeed4461da --- .../ar71xx/base-files/etc/board.d/01_leds | 4 ++- .../ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 4 +++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 4 +++ .../ar71xx/base-files/lib/upgrade/platform.sh | 4 +++ .../files/arch/mips/ath79/mach-cpe510.c | 36 +++++++++++++++++++ .../ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/generic-tp-link.mk | 7 ++++ tools/firmware-utils/src/tplink-safeloader.c | 12 ++++++- 9 files changed, 71 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index e0222f3637b60b..85755f0bd3a4e5 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -250,6 +250,7 @@ cf-e530n) cpe210|\ cpe210-v2|\ cpe210-v3|\ +cpe510-v2|\ cpe510|\ wbs210|\ wbs510) @@ -261,7 +262,8 @@ wbs510) case "$board" in cpe210-v2|\ - cpe210-v3) + cpe210-v3|\ + cpe510-v2) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan0" "eth0" ;; *) diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 5c0b7582124218..10f0b06b694317 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -76,6 +76,7 @@ ar71xx_setup_interfaces() cf-e380ac-v2|\ cpe210-v2|\ cpe210-v3|\ + cpe510-v2|\ dr342|\ eap120|\ eap300v2|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 4eb2abb26ca267..4f9aadbcd3a511 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -162,6 +162,10 @@ get_status_led() { cf-e385ac) status_led="$board:blue:wlan2g" ;; + cpe210-v2|\ + cpe210-v3|\ + cpe510-v2|\ + cpe210|\ cpe510) status_led="tp-link:green:link4" ;; diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 29cec2d8be712b..d9b6a553b554a5 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -594,6 +594,10 @@ ar71xx_board_detect() { name="cpe510" tplink_pharos_board_detect "$(tplink_pharos_get_model_string | tr -d '\r')" ;; + *"CPE510 v2") + name="cpe510-v2" + tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)" + ;; *"CPE830") name="cpe830" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index bf80a612fc756d..f4b099fc9961e8 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -593,6 +593,10 @@ platform_check_image() { tplink_pharos_check_image "$1" "01000000" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0 return 1 ;; + cpe510-v2) + tplink_pharos_check_image "$1" "7f454c46" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0 + return 1 + ;; a40|\ a60|\ mr1750|\ diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c index 16efbc8802ab96..2d5690d7e80621 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c @@ -230,6 +230,39 @@ static void __init cpe210_v2_setup(void) ath79_register_wmac(ee, mac); } +static void __init cpe510_v2_setup(void) +{ + u8 *mac = (u8 *) KSEG1ADDR(0x1f830008); + u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); + + /* disable PHY_SWAP and PHY_ADDR_SWAP bits */ + ath79_setup_ar933x_phy4_switch(false, false); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(cpe210_v2_leds_gpio), + cpe210_v2_leds_gpio); + ath79_register_gpio_keys_polled(-1, CPE510_KEYS_POLL_INTERVAL, + ARRAY_SIZE(cpe510_gpio_keys), + cpe510_gpio_keys); + ath79_register_m25p80(NULL); + ath79_register_mdio(1, 0x0); + /* WAN */ + ath79_switch_data.phy4_mii_en = 1; + ath79_switch_data.phy_poll_mask = BIT(4); + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.phy_mask = BIT(4); + ath79_eth0_data.mii_bus_dev = &ath79_mdio1_device.dev; + ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); + ath79_register_eth(0); + /* LAN */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_eth1_data.speed = SPEED_1000; + ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); + ath79_register_eth(1); + + ath79_register_wmac(ee, mac); +} + MIPS_MACHINE(ATH79_MACH_CPE210, "CPE210", "TP-LINK CPE210/220", cpe210_setup); @@ -239,6 +272,9 @@ MIPS_MACHINE(ATH79_MACH_CPE210_V2, "CPE210V2", "TP-LINK CPE210 v2", MIPS_MACHINE(ATH79_MACH_CPE210_V3, "CPE210V3", "TP-LINK CPE210 v3", cpe210_v2_setup); +MIPS_MACHINE(ATH79_MACH_CPE510_V2, "CPE510V2", "TP-LINK CPE510 v2", + cpe510_v2_setup); + MIPS_MACHINE(ATH79_MACH_CPE510, "CPE510", "TP-LINK CPE510/520", cpe510_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index c047a0a40a12c2..4d79499c3d9db8 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -76,6 +76,7 @@ enum ath79_mach_type { ATH79_MACH_CPE210, /* TP-LINK CPE210 v1 */ ATH79_MACH_CPE210_V2, /* TP-LINK CPE210 v2 */ ATH79_MACH_CPE210_V3, /* TP-LINK CPE210 v3 */ + ATH79_MACH_CPE510_V2, /* TP-LINK CPE510 v2 */ ATH79_MACH_CPE505N, /* P&W CPE505N */ ATH79_MACH_CPE510, /* TP-LINK CPE510 */ ATH79_MACH_CPE830, /* YunCore CPE830 */ diff --git a/target/linux/ar71xx/image/generic-tp-link.mk b/target/linux/ar71xx/image/generic-tp-link.mk index 2a6faa54dbe07d..b4cd0b86f90cd0 100644 --- a/target/linux/ar71xx/image/generic-tp-link.mk +++ b/target/linux/ar71xx/image/generic-tp-link.mk @@ -175,6 +175,13 @@ define Device/cpe510-520-v1 endef TARGET_DEVICES += cpe510-520-v1 +define Device/cpe510-v2 + $(Device/cpe510-520-v1) + DEVICE_TITLE := TP-LINK CPE510 v2 + BOARDNAME := CPE510V2 +endef +TARGET_DEVICES += cpe510-v2 + define Device/cpe210-220-v1 $(Device/cpe510-520-v1) DEVICE_TITLE := TP-LINK CPE210/220 v1 diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 01885683c31cd5..3ecdb1188714e2 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -214,7 +214,17 @@ static struct device_info boards[] = { "CPE510(TP-LINK|EU|N300-5):1.1\r\n" "CPE520(TP-LINK|UN|N300-5):1.1\r\n" "CPE520(TP-LINK|US|N300-5):1.1\r\n" - "CPE520(TP-LINK|EU|N300-5):1.1\r\n", + "CPE520(TP-LINK|EU|N300-5):1.1\r\n" + "CPE510(TP-LINK|EU|N300-5|00000000):2.0\r\n" + "CPE510(TP-LINK|EU|N300-5|45550000):2.0\r\n" + "CPE510(TP-LINK|EU|N300-5|55530000):2.0\r\n" + "CPE510(TP-LINK|UN|N300-5|00000000):2.0\r\n" + "CPE510(TP-LINK|UN|N300-5|45550000):2.0\r\n" + "CPE510(TP-LINK|UN|N300-5|55530000):2.0\r\n" + "CPE510(TP-LINK|US|N300-5|55530000):2.0\r\n" + "CPE510(TP-LINK|UN|N300-5):2.0\r\n" + "CPE510(TP-LINK|EU|N300-5):2.0\r\n" + "CPE510(TP-LINK|US|N300-5):2.0\r\n", .support_trail = '\xff', .soft_ver = NULL, From e0e46d9de87b77c3ab5c3e095f18ec1904a52f35 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Mon, 7 Oct 2019 18:34:36 -0300 Subject: [PATCH 130/146] ar71xx: Add Support for the TP-LINK CPE510 V3.0 Device Based on the work of Andrew Cameron at: https://github.com/aredn/aredn_ar71xx/commit/230eddf8bbd54bbe3dc99c5dfa5f2d5b1ee1734d --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 4 +++- .../linux/ar71xx/base-files/etc/board.d/02_network | 1 + target/linux/ar71xx/base-files/etc/diag.sh | 5 +++++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 4 ++++ .../linux/ar71xx/base-files/lib/upgrade/platform.sh | 3 ++- .../linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c | 3 +++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/generic-tp-link.mk | 7 +++++++ tools/firmware-utils/src/tplink-safeloader.c | 12 +++++++++++- 9 files changed, 37 insertions(+), 3 deletions(-) diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 85755f0bd3a4e5..5da5a429b02b2a 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -251,6 +251,7 @@ cpe210|\ cpe210-v2|\ cpe210-v3|\ cpe510-v2|\ +cpe510-v3|\ cpe510|\ wbs210|\ wbs510) @@ -263,7 +264,8 @@ wbs510) case "$board" in cpe210-v2|\ cpe210-v3|\ - cpe510-v2) + cpe510-v2|\ + cpe510-v3) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan0" "eth0" ;; *) diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index 10f0b06b694317..68b797a5813354 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -77,6 +77,7 @@ ar71xx_setup_interfaces() cpe210-v2|\ cpe210-v3|\ cpe510-v2|\ + cpe510-v3|\ dr342|\ eap120|\ eap300v2|\ diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 4f9aadbcd3a511..bf88ff35d33ce4 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -164,11 +164,16 @@ get_status_led() { ;; cpe210-v2|\ cpe210-v3|\ + cpe220-v3|\ cpe510-v2|\ + cpe510-v3|\ cpe210|\ cpe510) status_led="tp-link:green:link4" ;; + cpe610) + status_led="tp-link:green:link1" + ;; cr3000|\ cr5000) status_led="pcs:amber:power" diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index d9b6a553b554a5..3d58fb1cbea35c 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -598,6 +598,10 @@ ar71xx_board_detect() { name="cpe510-v2" tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)" ;; + *"CPE510 v3") + name="cpe510-v3" + tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)" + ;; *"CPE830") name="cpe830" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index f4b099fc9961e8..b13209788c2854 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -593,7 +593,8 @@ platform_check_image() { tplink_pharos_check_image "$1" "01000000" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0 return 1 ;; - cpe510-v2) + cpe510-v2|\ + cpe510-v3) tplink_pharos_check_image "$1" "7f454c46" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0 return 1 ;; diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c index 2d5690d7e80621..d51014637c2798 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c @@ -275,6 +275,9 @@ MIPS_MACHINE(ATH79_MACH_CPE210_V3, "CPE210V3", "TP-LINK CPE210 v3", MIPS_MACHINE(ATH79_MACH_CPE510_V2, "CPE510V2", "TP-LINK CPE510 v2", cpe510_v2_setup); +MIPS_MACHINE(ATH79_MACH_CPE510_V3, "CPE510V3", "TP-LINK CPE510 v3", + cpe510_v2_setup); + MIPS_MACHINE(ATH79_MACH_CPE510, "CPE510", "TP-LINK CPE510/520", cpe510_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 4d79499c3d9db8..7e4e69400570ec 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -77,6 +77,7 @@ enum ath79_mach_type { ATH79_MACH_CPE210_V2, /* TP-LINK CPE210 v2 */ ATH79_MACH_CPE210_V3, /* TP-LINK CPE210 v3 */ ATH79_MACH_CPE510_V2, /* TP-LINK CPE510 v2 */ + ATH79_MACH_CPE510_V3, /* TP-LINK CPE510 v3 */ ATH79_MACH_CPE505N, /* P&W CPE505N */ ATH79_MACH_CPE510, /* TP-LINK CPE510 */ ATH79_MACH_CPE830, /* YunCore CPE830 */ diff --git a/target/linux/ar71xx/image/generic-tp-link.mk b/target/linux/ar71xx/image/generic-tp-link.mk index b4cd0b86f90cd0..caa0e881ad3d38 100644 --- a/target/linux/ar71xx/image/generic-tp-link.mk +++ b/target/linux/ar71xx/image/generic-tp-link.mk @@ -182,6 +182,13 @@ define Device/cpe510-v2 endef TARGET_DEVICES += cpe510-v2 +define Device/cpe510-v3 + $(Device/cpe510-520-v1) + DEVICE_TITLE := TP-LINK CPE510 v3 + BOARDNAME := CPE510V3 +endef +TARGET_DEVICES += cpe510-v3 + define Device/cpe210-220-v1 $(Device/cpe510-520-v1) DEVICE_TITLE := TP-LINK CPE210/220 v1 diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 3ecdb1188714e2..aa1fe843f4507b 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -224,7 +224,17 @@ static struct device_info boards[] = { "CPE510(TP-LINK|US|N300-5|55530000):2.0\r\n" "CPE510(TP-LINK|UN|N300-5):2.0\r\n" "CPE510(TP-LINK|EU|N300-5):2.0\r\n" - "CPE510(TP-LINK|US|N300-5):2.0\r\n", + "CPE510(TP-LINK|US|N300-5):2.0\r\n" + "CPE510(TP-LINK|EU|N300-5|00000000):3.0\r\n" + "CPE510(TP-LINK|EU|N300-5|45550000):3.0\r\n" + "CPE510(TP-LINK|EU|N300-5|55530000):3.0\r\n" + "CPE510(TP-LINK|UN|N300-5|00000000):3.0\r\n" + "CPE510(TP-LINK|UN|N300-5|45550000):3.0\r\n" + "CPE510(TP-LINK|UN|N300-5|55530000):3.0\r\n" + "CPE510(TP-LINK|US|N300-5|55530000):3.0\r\n" + "CPE510(TP-LINK|UN|N300-5):3.0\r\n" + "CPE510(TP-LINK|EU|N300-5):3.0\r\n" + "CPE510(TP-LINK|US|N300-5):3.0\r\n", .support_trail = '\xff', .soft_ver = NULL, From d5d9198859c3545a09be2f0d384f3b301a5af24b Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 9 Oct 2019 13:13:34 -0300 Subject: [PATCH 131/146] remove files/etc/lime-defaults-factory As we are currently using this buildroot to build not only for the LibreRouter but also for other devices then we should not hardcode functionality that is only intended for the LibreRouter. Lets fix this by other means. --- files/etc/config/lime-defaults-factory | 63 -------------------------- 1 file changed, 63 deletions(-) delete mode 100644 files/etc/config/lime-defaults-factory diff --git a/files/etc/config/lime-defaults-factory b/files/etc/config/lime-defaults-factory deleted file mode 100644 index 05ad0a7f0a6ab2..00000000000000 --- a/files/etc/config/lime-defaults-factory +++ /dev/null @@ -1,63 +0,0 @@ -# Beware this file is NOT supposed to be edited by the end user, modify /etc/config/lime instead -# If the same option or list is defined both in /etc/config/lime and lime-defaults file, the former will prevail -# Beware this file is not supposed to store interface specific configuration, like "config net eth0" - -# Read the documentation in /docs directory -# and on http://libremesh.org - -config lime system - option hostname 'LiMe-%M4%M5%M6' - option domain 'lan' - option keep_on_upgrade 'libremesh base-files-essential /etc/sysupgrade.conf' - -config lime network - option primary_interface 'eth0' - option main_ipv4_address '10.%N1.0.0/16' - option anygw_dhcp_start '2' - option anygw_dhcp_limit '0' - option main_ipv6_address '2a00:1508:0a%N1:%N200::/64' - option bmx6_mtu '1500' - option bmx7_mtu '1500' - list protocols ieee80211s - list protocols lan - list protocols anygw - list protocols batadv:%N1 - list protocols bmx6:13 - list protocols olsr:14 - list protocols olsr6:15 - list protocols olsr2:16 - list protocols babeld:17 - list protocols bmx7:18 - list resolvers 4.2.2.2 # b.resolvers.Level3.net - list resolvers 141.1.1.1 # cns1.cw.net - list resolvers 2001:470:20::2 # ordns.he.net - option bmx6_mtu '1500' - option bmx6_publish_ownip false - option bmx6_over_batman false - option bmx6_pref_gw none - option bmx6_wifi_rate_max 54000000 - option bmx7_publish_ownip false - option bmx7_over_batman false - option bmx7_pref_gw none - option bmx7_wifi_rate_max 'auto' - option anygw_mac "aa:aa:aa:%N1:%N2:aa" - option use_odhcpd false - -config lime wifi - option channel_2ghz '11' - list channel_5ghz '157' - list channel_5ghz '48' - option htmode_5ghz 'HT40' - option distance_2ghz '100' - option distance_5ghz '1000' - list modes 'ap_2ghz' - list modes 'apname_2ghz' - list modes 'ieee80211s_5ghz' - option ap_ssid 'LibreMesh.org' - option apname_ssid 'LibreMesh.org/%H' - option adhoc_ssid 'LiMe' - option adhoc_bssid 'ca:fe:00:c0:ff:ee' - option adhoc_mcast_rate_2ghz '24000' - option adhoc_mcast_rate_5ghz '6000' - option ieee80211s_mesh_fwding '0' - option ieee80211s_mesh_id 'LiMe' From 495eb8b3ca33a8ff85d20f8986772fcfa4de0a60 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 9 Oct 2019 21:17:32 -0300 Subject: [PATCH 132/146] uci-defaults to add librerouter feeds The librerouter feed is intended to provide binary release dependent packages like kernel modules. --- .../etc/uci-defaults/92_add-librerouter-repos | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 files/etc/uci-defaults/92_add-librerouter-repos diff --git a/files/etc/uci-defaults/92_add-librerouter-repos b/files/etc/uci-defaults/92_add-librerouter-repos new file mode 100644 index 00000000000000..cd785612179da4 --- /dev/null +++ b/files/etc/uci-defaults/92_add-librerouter-repos @@ -0,0 +1,28 @@ +#!/bin/sh + +. /etc/os-release +[ -f /etc/lime_release ] && . /etc/lime_release + +feeds_file="/etc/opkg/librerouterfeeds.conf" + +[ -f "$feeds_file" ] && { + echo "LibreRouter opkg feeds already defined - skipping" + exit 0 +} + +[ -z "$LEDE_ARCH" ] && { + echo "Release information not available, skipping opkg configuration" + exit 0 +} + +[ "$LIME_CODENAME" != "development" ] && { + base_url="http://repo.librerouter.org/releases/$LIME_RELEASE/targets/$LEDE_BOARD/packages" + echo "Configuring official LibreRouter opkg feeds" + echo "src/gz librerouter $base_url" > /etc/opkg/librerouterfeeds.conf + key_name="a71b3c8285abd28b" + key_content="RWSnGzyChavSiyQ+vLk3x7F0NqcLa4kKyXCdriThMhO78ldHgxGljM/8" + echo "$key_content" >> "/etc/opkg/keys/$key_name" +} || { + echo "Not configuring LibreRouter feed as it is a development built" +} + From 7beb0cacabc297df7be4fdd5875a08b57e945613 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 9 Oct 2019 23:17:15 -0300 Subject: [PATCH 133/146] Revert "enable busybox CROND_SPECIAL_TIMES @reboot, @hourly, etc" This reverts commit dfce6c57901dc9b9894ef55f3dcebf6ea6e57978. --- configs/default_config | 1 - package/utils/busybox/config/miscutils/Config.in | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/configs/default_config b/configs/default_config index 41524e0ed74594..cfa2730bf83cc9 100644 --- a/configs/default_config +++ b/configs/default_config @@ -5,7 +5,6 @@ CONFIG_DEVEL=y CONFIG_BUSYBOX_CUSTOM=y CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y CONFIG_BUSYBOX_CONFIG_DEVMEM=y -CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES=y CONFIG_BUSYBOX_CONFIG_NC_SERVER=y CONFIG_BWMNG_EXTENDEDSTATS=y CONFIG_BWMNG_TIME=y diff --git a/package/utils/busybox/config/miscutils/Config.in b/package/utils/busybox/config/miscutils/Config.in index 1b978195d89f33..61c5458b637c6b 100644 --- a/package/utils/busybox/config/miscutils/Config.in +++ b/package/utils/busybox/config/miscutils/Config.in @@ -157,22 +157,6 @@ config BUSYBOX_CONFIG_FEATURE_CROND_CALL_SENDMAIL help Command output will be sent to corresponding user via email. -config BUSYBOX_CONFIG_FEATURE_CROND_SPECIAL_TIMES - bool "Support special times (@reboot, @daily, etc) in crontabs" - default BUSYBOX_DEFAULT_FEATURE_CROND_SPECIAL_TIMES - depends on BUSYBOX_CONFIG_CROND - help - string meaning - ------ ------- - @reboot Run once, at startup - @yearly Run once a year: "0 0 1 1 *" - @annually Same as @yearly: "0 0 1 1 *" - @monthly Run once a month: "0 0 1 * *" - @weekly Run once a week: "0 0 * * 0" - @daily Run once a day: "0 0 * * *" - @midnight Same as @daily: "0 0 * * *" - @hourly Run once an hour: "0 * * * *" - config BUSYBOX_CONFIG_FEATURE_CROND_DIR string "crond spool directory" default BUSYBOX_DEFAULT_FEATURE_CROND_DIR From c9dad82ea2c922d8be1e17a159fd477bfeb2e6af Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 10 Oct 2019 18:01:28 -0300 Subject: [PATCH 134/146] uhttpd: fix script-timeout not working if headers sent --- .../patches/010-fix-cgi-script-timeout.patch | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 package/network/services/uhttpd/patches/010-fix-cgi-script-timeout.patch diff --git a/package/network/services/uhttpd/patches/010-fix-cgi-script-timeout.patch b/package/network/services/uhttpd/patches/010-fix-cgi-script-timeout.patch new file mode 100644 index 00000000000000..74ba524b0667b3 --- /dev/null +++ b/package/network/services/uhttpd/patches/010-fix-cgi-script-timeout.patch @@ -0,0 +1,26 @@ +commit 1e6afc1a9ab22bba105191c2905d95aec7558e00 (HEAD -> fix_cgi_script_timeout) +Author: Santiago Piccinini +Date: Thu Oct 10 17:26:48 2019 -0300 + + do not cancell script killing after writing headers + + Before this change if the cgi script hangs after writing headers + then the process will never be killed. Let's only cancel the timeout + if the process ends. + + Signed-off-by: Santiago Piccinini + +--- a/proc.c ++++ b/proc.c +@@ -225,11 +225,9 @@ static void proc_handle_header(struct re + static void proc_handle_header_end(struct relay *r) + { + struct client *cl = r->cl; +- struct dispatch_proc *p = &cl->dispatch.proc; + struct blob_attr *cur; + int rem; + +- uloop_timeout_cancel(&p->timeout); + uh_http_header(cl, cl->dispatch.proc.status_code, cl->dispatch.proc.status_msg); + blob_for_each_attr(cur, cl->dispatch.proc.hdr.head, rem) + ustream_printf(cl->us, "%s: %s\r\n", blobmsg_name(cur), blobmsg_data(cur)); From 1eb4ed73cb94fd3f7352174365c56fca97632905 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 17 Oct 2019 19:08:21 -0300 Subject: [PATCH 135/146] add librerouter-hw package with an initial tool to validate hardware --- package/system/librerouter-hw/Makefile | 32 +++++++++++ .../uci-defaults/99-run-librerouter-hw-check | 6 ++ .../files/usr/sbin/librerouter-hw-check | 57 +++++++++++++++++++ target/linux/ar71xx/image/generic.mk | 2 +- 4 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 package/system/librerouter-hw/Makefile create mode 100755 package/system/librerouter-hw/files/etc/uci-defaults/99-run-librerouter-hw-check create mode 100755 package/system/librerouter-hw/files/usr/sbin/librerouter-hw-check diff --git a/package/system/librerouter-hw/Makefile b/package/system/librerouter-hw/Makefile new file mode 100644 index 00000000000000..5670b33b38c8a3 --- /dev/null +++ b/package/system/librerouter-hw/Makefile @@ -0,0 +1,32 @@ +# +# Copyright (C) 2019 Santiago Piccinini +# +# This is free software, licensed under the GNU General Public License v3. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=librerouter-hw +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/$(PKG_NAME) + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Librerouter hardware tools +endef + +define Package/$(PKG_NAME)/description + Tools for the librerouter HW support. +endef + +define Build/Compile +endef + +define Package/$(PKG_NAME)/install + $(INSTALL_DIR) $(1)/ + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/system/librerouter-hw/files/etc/uci-defaults/99-run-librerouter-hw-check b/package/system/librerouter-hw/files/etc/uci-defaults/99-run-librerouter-hw-check new file mode 100755 index 00000000000000..adb5e133fcd299 --- /dev/null +++ b/package/system/librerouter-hw/files/etc/uci-defaults/99-run-librerouter-hw-check @@ -0,0 +1,6 @@ +#!/bin/sh + +# we wait until the LR is configured, up and stable +(sleep 200 && librerouter-hw-check )& + +exit 0 diff --git a/package/system/librerouter-hw/files/usr/sbin/librerouter-hw-check b/package/system/librerouter-hw/files/usr/sbin/librerouter-hw-check new file mode 100755 index 00000000000000..7d0804522ff52e --- /dev/null +++ b/package/system/librerouter-hw/files/usr/sbin/librerouter-hw-check @@ -0,0 +1,57 @@ +#!/usr/bin/env lua + +local ERRORS = false + +local function run_command_get_output(cmd) + local handle = io.popen(cmd) + local output = handle:read('*all') + handle:close() + return output +end + +local report_file = io.open('/root/librerouter-hw-check-report.txt', 'w') + +local function log(str) + print(str) + report_file:write(str..'\n') +end + +log('* Checking radio interfaces:') +local up_interfaces = run_command_get_output("iw dev | grep Interface | awk '{print $2}'") + +for _, iface_prefix in pairs({'wlan0', 'wlan1', 'wlan2'}) do + local up = string.find(up_interfaces, iface_prefix) ~= nil + if up then + log('\t' .. iface_prefix .. ' interface: OK') + else + log('\t' .. iface_prefix .. ' interface: BAD') + ERRORS = true + end +end + +log('* Checking mac addresses:') +local mac_addresses = run_command_get_output("cat /sys/class/net/*/address") + +local bad_mac_empty = string.find(mac_addresses, '02:03:04:05:06') ~= nil +local bad_mac_atheros = string.find(mac_addresses, '00:03:7f:00:01') ~= nil + +local bad_mac = bad_mac_empty or bad_mac_atheros +if bad_mac then + log('\tMAC address: BAD') + log(mac_addresses) + ERRORS = true +else + log('\tMAC address: OK') +end + +-- run safe-upgrade bootstraping. There is no problem if it is already bootstraped +run_command_get_output("safe-upgrade bootstrap") + + +if ERRORS then + log("ERROR: errors ocurred!") + os.exit(125) +else + log("SUCCESS") + os.exit(0) +end diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 0d1018c66df444..c181bfa682963a 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -1391,7 +1391,7 @@ TARGET_DEVICES += fritz450e define Device/librerouter-v1 DEVICE_TITLE := LibreRouter v1 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage safe-upgrade om-watchdog + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage safe-upgrade om-watchdog librerouter-hw BOARDNAME := LIBREROUTERV1 IMAGE_SIZE := 32384k KERNEL := kernel-bin | lzma | uImage lzma From 85055be6c24db53ccc43a22c982bc8020dbbdc28 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 17 Oct 2019 22:49:23 -0300 Subject: [PATCH 136/146] git: do not ignore .orig nor .rej I lost a lot of time because I was not seeing these files and they were getting inside the image /etc/board.d/02_network.orig ... leading to very unexpected results... --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index b79b51f388083d..498005d3f38577 100644 --- a/.gitignore +++ b/.gitignore @@ -16,8 +16,6 @@ /package/feeds /package/openwrt-packages key-build* -*.orig -*.rej *~ .#* *# From d3d4100d2cabc2cfdc02ae70ef18da49fb6f0e90 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 17 Oct 2019 22:50:34 -0300 Subject: [PATCH 137/146] select bandwidth-test package --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index cfa2730bf83cc9..1b7925aca4a1b4 100644 --- a/configs/default_config +++ b/configs/default_config @@ -24,6 +24,7 @@ CONFIG_KMOD_BATMAN_ADV_MCAST=y CONFIG_PACKAGE_ATH_DEBUG=y CONFIG_PACKAGE_ATH_SPECTRAL=y CONFIG_PACKAGE_babeld=y +CONFIG_PACKAGE_bandwidth-test=y CONFIG_PACKAGE_batctl=y CONFIG_PACKAGE_block-mount=y CONFIG_PACKAGE_bwm-ng=y From 8e410d4921375df4b57aadc3bbcd80a329cbeaea Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 17 Oct 2019 22:50:46 -0300 Subject: [PATCH 138/146] select deferable-reboot --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 1b7925aca4a1b4..378e8b324f148e 100644 --- a/configs/default_config +++ b/configs/default_config @@ -30,6 +30,7 @@ CONFIG_PACKAGE_block-mount=y CONFIG_PACKAGE_bwm-ng=y # CONFIG_PACKAGE_dnsmasq is not set CONFIG_PACKAGE_check-date-http=y +CONFIG_PACKAGE_deferable-reboot=y CONFIG_PACKAGE_dnsmasq-dhcpv6=y CONFIG_PACKAGE_ebtables=y CONFIG_PACKAGE_ethtool=y From 9fa645684d45edd26c922e5a196ae2b5bcfae9ca Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 17 Oct 2019 22:50:59 -0300 Subject: [PATCH 139/146] select lime-report --- configs/default_config | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/default_config b/configs/default_config index 378e8b324f148e..3762bb951c98a1 100644 --- a/configs/default_config +++ b/configs/default_config @@ -91,6 +91,7 @@ CONFIG_PACKAGE_lime-proto-anygw=y CONFIG_PACKAGE_lime-proto-babeld=y CONFIG_PACKAGE_lime-proto-batadv=y CONFIG_PACKAGE_lime-proto-wan=y +CONFIG_PACKAGE_lime-report=y CONFIG_PACKAGE_lime-system=y CONFIG_PACKAGE_luci-base=y CONFIG_PACKAGE_luci-lib-httpclient=y From da50bf83db26b527362371930fd0b0dd495d0d6e Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Thu, 17 Oct 2019 22:51:23 -0300 Subject: [PATCH 140/146] reorder package shared-state-nodes_and_links --- configs/default_config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index 3762bb951c98a1..33f2d6f44f48e8 100644 --- a/configs/default_config +++ b/configs/default_config @@ -119,9 +119,9 @@ CONFIG_PACKAGE_shared-state-babeld_hosts=y CONFIG_PACKAGE_shared-state-bat_hosts=y CONFIG_PACKAGE_shared-state-dnsmasq_hosts=y CONFIG_PACKAGE_shared-state-dnsmasq_leases=y +CONFIG_PACKAGE_shared-state-nodes_and_links=y CONFIG_PACKAGE_shared-state-persist=y CONFIG_PACKAGE_shared-state-pirania=y -CONFIG_PACKAGE_shared-state-nodes_and_links=y CONFIG_PACKAGE_sprunge=y CONFIG_PACKAGE_tcpdump-mini=y CONFIG_PACKAGE_terminfo=y From 414bf67dc2162492ec004747f507440dd891ff11 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 18 Oct 2019 15:34:24 -0300 Subject: [PATCH 141/146] Revert "remove files/etc/lime-defaults-factory" This reverts commit d5d9198859c3545a09be2f0d384f3b301a5af24b. --- files/etc/config/lime-defaults-factory | 63 ++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 files/etc/config/lime-defaults-factory diff --git a/files/etc/config/lime-defaults-factory b/files/etc/config/lime-defaults-factory new file mode 100644 index 00000000000000..05ad0a7f0a6ab2 --- /dev/null +++ b/files/etc/config/lime-defaults-factory @@ -0,0 +1,63 @@ +# Beware this file is NOT supposed to be edited by the end user, modify /etc/config/lime instead +# If the same option or list is defined both in /etc/config/lime and lime-defaults file, the former will prevail +# Beware this file is not supposed to store interface specific configuration, like "config net eth0" + +# Read the documentation in /docs directory +# and on http://libremesh.org + +config lime system + option hostname 'LiMe-%M4%M5%M6' + option domain 'lan' + option keep_on_upgrade 'libremesh base-files-essential /etc/sysupgrade.conf' + +config lime network + option primary_interface 'eth0' + option main_ipv4_address '10.%N1.0.0/16' + option anygw_dhcp_start '2' + option anygw_dhcp_limit '0' + option main_ipv6_address '2a00:1508:0a%N1:%N200::/64' + option bmx6_mtu '1500' + option bmx7_mtu '1500' + list protocols ieee80211s + list protocols lan + list protocols anygw + list protocols batadv:%N1 + list protocols bmx6:13 + list protocols olsr:14 + list protocols olsr6:15 + list protocols olsr2:16 + list protocols babeld:17 + list protocols bmx7:18 + list resolvers 4.2.2.2 # b.resolvers.Level3.net + list resolvers 141.1.1.1 # cns1.cw.net + list resolvers 2001:470:20::2 # ordns.he.net + option bmx6_mtu '1500' + option bmx6_publish_ownip false + option bmx6_over_batman false + option bmx6_pref_gw none + option bmx6_wifi_rate_max 54000000 + option bmx7_publish_ownip false + option bmx7_over_batman false + option bmx7_pref_gw none + option bmx7_wifi_rate_max 'auto' + option anygw_mac "aa:aa:aa:%N1:%N2:aa" + option use_odhcpd false + +config lime wifi + option channel_2ghz '11' + list channel_5ghz '157' + list channel_5ghz '48' + option htmode_5ghz 'HT40' + option distance_2ghz '100' + option distance_5ghz '1000' + list modes 'ap_2ghz' + list modes 'apname_2ghz' + list modes 'ieee80211s_5ghz' + option ap_ssid 'LibreMesh.org' + option apname_ssid 'LibreMesh.org/%H' + option adhoc_ssid 'LiMe' + option adhoc_bssid 'ca:fe:00:c0:ff:ee' + option adhoc_mcast_rate_2ghz '24000' + option adhoc_mcast_rate_5ghz '6000' + option ieee80211s_mesh_fwding '0' + option ieee80211s_mesh_id 'LiMe' From b536696f27b3803041dc7a2327157ef69a76e953 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 18 Oct 2019 15:35:01 -0300 Subject: [PATCH 142/146] om-watchdog is automatically selected when building librerouter --- configs/default_config | 1 - 1 file changed, 1 deletion(-) diff --git a/configs/default_config b/configs/default_config index 33f2d6f44f48e8..6dd6b646c765c6 100644 --- a/configs/default_config +++ b/configs/default_config @@ -107,7 +107,6 @@ CONFIG_PACKAGE_luci-lib-libremap-wireless=y CONFIG_PACKAGE_luci-lib-nixio=y CONFIG_PACKAGE_mtr=y CONFIG_PACKAGE_netperf=y -CONFIG_PACKAGE_om-watchdog=y CONFIG_PACKAGE_pirania=y CONFIG_PACKAGE_pirania-app=y CONFIG_PACKAGE_pv=y From fb4eb0a4c76286e763ed8a2793822fb2ce8e646a Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 18 Oct 2019 15:35:40 -0300 Subject: [PATCH 143/146] fix LibreMesh git version for release --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index d2e13059e76125..44c406240160ca 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -3,5 +3,5 @@ src-git luci https://git.openwrt.org/project/luci.git^4d6d8bc5b0d7ee71c7b29b12e7 src-git routing https://github.com/LibreRouterOrg/routing.git^2aa1506714d28704234998808249907a8289d945 src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 -src-git libremesh https://github.com/libremesh/lime-packages.git;master +src-git libremesh https://github.com/libremesh/lime-packages.git^ae3bbaa02d5b03780218d7c65d748be019a39752 src-git libremap https://github.com/libremesh/libremap-agent.git;master From a6b914dd9060dbcc423c8444700518129072db3c Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Fri, 18 Oct 2019 19:06:31 -0300 Subject: [PATCH 144/146] update order of 5GHz channel for latest libremesh --- files/etc/config/lime-defaults-factory | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/etc/config/lime-defaults-factory b/files/etc/config/lime-defaults-factory index 05ad0a7f0a6ab2..2b6b0aca51e3b1 100644 --- a/files/etc/config/lime-defaults-factory +++ b/files/etc/config/lime-defaults-factory @@ -45,8 +45,8 @@ config lime network config lime wifi option channel_2ghz '11' - list channel_5ghz '157' list channel_5ghz '48' + list channel_5ghz '157' option htmode_5ghz 'HT40' option distance_2ghz '100' option distance_5ghz '1000' From 2bd9c9108700db683a152c5fafe82dfef0f61786 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 20 Nov 2019 11:43:38 -0300 Subject: [PATCH 145/146] update lime-packages --- feeds.conf.default | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feeds.conf.default b/feeds.conf.default index 44c406240160ca..2b2d7732129e7e 100644 --- a/feeds.conf.default +++ b/feeds.conf.default @@ -3,5 +3,5 @@ src-git luci https://git.openwrt.org/project/luci.git^4d6d8bc5b0d7ee71c7b29b12e7 src-git routing https://github.com/LibreRouterOrg/routing.git^2aa1506714d28704234998808249907a8289d945 src-git telephony https://git.openwrt.org/feed/telephony.git^507eabe1b60458ceb1a535aec9d12c8be95706f0 -src-git libremesh https://github.com/libremesh/lime-packages.git^ae3bbaa02d5b03780218d7c65d748be019a39752 +src-git libremesh https://github.com/libremesh/lime-packages.git^a5ab2e48bc9e6318c3928a5164238baa731af1d3 src-git libremap https://github.com/libremesh/libremap-agent.git;master From 863d464a4741a52494b197e6ca50abb2ac60f198 Mon Sep 17 00:00:00 2001 From: Santiago Piccinini Date: Wed, 20 Nov 2019 11:55:42 -0300 Subject: [PATCH 146/146] move wifi config from lime-defaults-factory to lime-community --- files/etc/config/lime-community | 19 ++++++++ files/etc/config/lime-defaults-factory | 63 -------------------------- 2 files changed, 19 insertions(+), 63 deletions(-) create mode 100644 files/etc/config/lime-community delete mode 100644 files/etc/config/lime-defaults-factory diff --git a/files/etc/config/lime-community b/files/etc/config/lime-community new file mode 100644 index 00000000000000..16124ddbc40693 --- /dev/null +++ b/files/etc/config/lime-community @@ -0,0 +1,19 @@ +# Read the documentation in /docs directory +# and on http://libremesh.org + +### System options + +config lime system + + +### Network general option + +config lime network + + +### WiFi general options + +config lime wifi + list modes 'ap_2ghz' + list modes 'apname_2ghz' + list modes 'ieee80211s_5ghz' diff --git a/files/etc/config/lime-defaults-factory b/files/etc/config/lime-defaults-factory deleted file mode 100644 index 2b6b0aca51e3b1..00000000000000 --- a/files/etc/config/lime-defaults-factory +++ /dev/null @@ -1,63 +0,0 @@ -# Beware this file is NOT supposed to be edited by the end user, modify /etc/config/lime instead -# If the same option or list is defined both in /etc/config/lime and lime-defaults file, the former will prevail -# Beware this file is not supposed to store interface specific configuration, like "config net eth0" - -# Read the documentation in /docs directory -# and on http://libremesh.org - -config lime system - option hostname 'LiMe-%M4%M5%M6' - option domain 'lan' - option keep_on_upgrade 'libremesh base-files-essential /etc/sysupgrade.conf' - -config lime network - option primary_interface 'eth0' - option main_ipv4_address '10.%N1.0.0/16' - option anygw_dhcp_start '2' - option anygw_dhcp_limit '0' - option main_ipv6_address '2a00:1508:0a%N1:%N200::/64' - option bmx6_mtu '1500' - option bmx7_mtu '1500' - list protocols ieee80211s - list protocols lan - list protocols anygw - list protocols batadv:%N1 - list protocols bmx6:13 - list protocols olsr:14 - list protocols olsr6:15 - list protocols olsr2:16 - list protocols babeld:17 - list protocols bmx7:18 - list resolvers 4.2.2.2 # b.resolvers.Level3.net - list resolvers 141.1.1.1 # cns1.cw.net - list resolvers 2001:470:20::2 # ordns.he.net - option bmx6_mtu '1500' - option bmx6_publish_ownip false - option bmx6_over_batman false - option bmx6_pref_gw none - option bmx6_wifi_rate_max 54000000 - option bmx7_publish_ownip false - option bmx7_over_batman false - option bmx7_pref_gw none - option bmx7_wifi_rate_max 'auto' - option anygw_mac "aa:aa:aa:%N1:%N2:aa" - option use_odhcpd false - -config lime wifi - option channel_2ghz '11' - list channel_5ghz '48' - list channel_5ghz '157' - option htmode_5ghz 'HT40' - option distance_2ghz '100' - option distance_5ghz '1000' - list modes 'ap_2ghz' - list modes 'apname_2ghz' - list modes 'ieee80211s_5ghz' - option ap_ssid 'LibreMesh.org' - option apname_ssid 'LibreMesh.org/%H' - option adhoc_ssid 'LiMe' - option adhoc_bssid 'ca:fe:00:c0:ff:ee' - option adhoc_mcast_rate_2ghz '24000' - option adhoc_mcast_rate_5ghz '6000' - option ieee80211s_mesh_fwding '0' - option ieee80211s_mesh_id 'LiMe'