[OpenWrt-Devel] Linux kernel config options handling in OpenWRT

2015-08-17 Thread Alexey Brodkin
Hello,

I'm playing with OpenWRT for a new platform and have a question on
how OpenWRT handles KCONFIG kernel options.

For example I select "KernelPackage/crypto-core" in OpenWRT's menuconfig
then KCONFIG is populated with:
-->8
CONFIG_CRYPTO=y
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_BLKCIPHER
CONFIG_CRYPTO_ALGAPI
-->8

>From what I may see from grepping through OpenWRT that KCONFIG value
is only used to determine if those options are enabled in kernel configuration
but not for force selection of options in kernel.

In other words if I want to get crypto core built I need to make sure first
that in my say "target/linux/board/config-4.1" options mentioned above are
enabled. Is that observation correct?

I'm asking because my initial assumption was I need to provide a minimal
kernel configuration in "target/linux/board/config-4.1" and then on
selection of kmods in OpenWRT's menuconfig missing config options
will be automatically added in kernel config.

But apparently no options are auto-enabled because I'm seeing that kind
of build failure if CONFIG_CRYPTO_BLKCIPHER is not explicitly set in my
kernel config:
-->8
NOTICE: module 'xxx/openwrt/build_dir/target-yyy/linux-zzz/linux
-4.1.3/crypto/crypto_algapi.ko' is built-in.
ERROR: module 'xxx/openwrt/build_dir/target-yyy/linux-zzz/linux
-4.1.3/crypto/crypto_blkcipher.ko' is missing.
modules/crypto.mk:30: recipe for target 'xxx/openwrt/bin/axs10x
-uClibc/packages/base/kmod-crypto-core_4.1.3-1_axs10x.ipk' failed
make[3]: *** [xxx/openwrt/bin/axs10x
-uClibc/packages/base/kmod-crypto-core_4.1.3-1_axs10x.ipk] Error 1
-->8

-Alexey
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] oxnas: remove support for kernel 3.18 and 4.0

2015-08-17 Thread Daniel Golle
Signed-off-by: Daniel Golle 
---
 target/linux/oxnas/config-3.18 | 357 
 target/linux/oxnas/config-4.0  | 374 -
 .../010-arm_introduce-dma-fiq-irq-broadcast.patch  |  56 ---
 .../250-add-plxtech-vendor-prefix.patch|  10 -
 .../300-introduce-oxnas-platform.patch |  69 
 .../oxnas/patches-3.18/310-oxnas-clocksource.patch |  25 --
 .../oxnas/patches-3.18/320-oxnas-irqchip.patch |  34 --
 .../oxnas/patches-3.18/330-oxnas-pinctrl.patch |  28 --
 .../linux/oxnas/patches-3.18/340-oxnas-pcie.patch  |  22 --
 .../linux/oxnas/patches-3.18/350-oxnas-reset.patch |  20 --
 .../linux/oxnas/patches-3.18/400-oxnas-nand.patch  |  24 --
 .../linux/oxnas/patches-3.18/500-oxnas-sata.patch  |  26 --
 .../linux/oxnas/patches-3.18/800-oxnas-ehci.patch  |  26 --
 .../linux/oxnas/patches-3.18/900-more-boards.patch |  14 -
 .../oxnas/patches-3.18/999-libata-hacks.patch  |  57 
 .../010-arm_introduce-dma-fiq-irq-broadcast.patch  |  56 ---
 .../250-add-plxtech-vendor-prefix.patch|  10 -
 .../patches-4.0/300-introduce-oxnas-platform.patch |  69 
 .../oxnas/patches-4.0/310-oxnas-clocksource.patch  |  25 --
 .../oxnas/patches-4.0/320-oxnas-irqchip.patch  |  34 --
 .../oxnas/patches-4.0/330-oxnas-pinctrl.patch  |  28 --
 .../linux/oxnas/patches-4.0/340-oxnas-pcie.patch   |  22 --
 .../linux/oxnas/patches-4.0/350-oxnas-reset.patch  |  20 --
 .../linux/oxnas/patches-4.0/400-oxnas-nand.patch   |  25 --
 .../linux/oxnas/patches-4.0/500-oxnas-sata.patch   |  26 --
 .../linux/oxnas/patches-4.0/800-oxnas-ehci.patch   |  26 --
 .../linux/oxnas/patches-4.0/900-more-boards.patch  |  14 -
 .../linux/oxnas/patches-4.0/999-libata-hacks.patch |  57 
 28 files changed, 1554 deletions(-)
 delete mode 100644 target/linux/oxnas/config-3.18
 delete mode 100644 target/linux/oxnas/config-4.0
 delete mode 100644 
target/linux/oxnas/patches-3.18/010-arm_introduce-dma-fiq-irq-broadcast.patch
 delete mode 100644 
target/linux/oxnas/patches-3.18/250-add-plxtech-vendor-prefix.patch
 delete mode 100644 
target/linux/oxnas/patches-3.18/300-introduce-oxnas-platform.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/310-oxnas-clocksource.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/320-oxnas-irqchip.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/330-oxnas-pinctrl.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/340-oxnas-pcie.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/350-oxnas-reset.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/400-oxnas-nand.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/500-oxnas-sata.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/800-oxnas-ehci.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/900-more-boards.patch
 delete mode 100644 target/linux/oxnas/patches-3.18/999-libata-hacks.patch
 delete mode 100644 
target/linux/oxnas/patches-4.0/010-arm_introduce-dma-fiq-irq-broadcast.patch
 delete mode 100644 
target/linux/oxnas/patches-4.0/250-add-plxtech-vendor-prefix.patch
 delete mode 100644 
target/linux/oxnas/patches-4.0/300-introduce-oxnas-platform.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/310-oxnas-clocksource.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/320-oxnas-irqchip.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/330-oxnas-pinctrl.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/340-oxnas-pcie.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/350-oxnas-reset.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/400-oxnas-nand.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/500-oxnas-sata.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/800-oxnas-ehci.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/900-more-boards.patch
 delete mode 100644 target/linux/oxnas/patches-4.0/999-libata-hacks.patch

diff --git a/target/linux/oxnas/config-3.18 b/target/linux/oxnas/config-3.18
deleted file mode 100644
index 379b2b0..000
--- a/target/linux/oxnas/config-3.18
+++ /dev/null
@@ -1,357 +0,0 @@
-CONFIG_ALIGNMENT_TRAP=y
-# CONFIG_APM_EMULATION is not set
-CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
-CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y
-CONFIG_ARCH_HAS_RESET_CONTROLLER=y
-# CONFIG_ARCH_HAS_SG_CHAIN is not set
-CONFIG_ARCH_HAS_TICK_BROADCAST=y
-CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_NR_GPIO=0
-CONFIG_ARCH_OXNAS=y
-CONFIG_ARCH_REQUIRE_GPIOLIB=y
-# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
-# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
-CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
-CONFIG_ARCH_SUPPORTS_UPROBES=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_USE_BUILTIN_BSWAP=y
-CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
-CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
-CONFIG_ARCH_WANT_LIBATA_LEDS=y
-CONFIG_ARM=y
-# CONFIG_ARM_CPU_SUSPEND is not set

Re: [OpenWrt-Devel] [PATCH] iwinfo: do not wait for scan results if scan request failed.

2015-08-17 Thread John Crispin
Hi,

I have various issues with this patch

On 31/07/2015 10:53, Dmitry Ivanov wrote:
> Do not wait for scan results if scan request failed.
> 
> Signed-off-by: Dmitry Ivanov 
> ---
>  iwinfo_nl80211.c | 14 ++
>  1 file changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
> index 900eef2..251ec33 100644
> --- a/iwinfo_nl80211.c
> +++ b/iwinfo_nl80211.c
> @@ -389,11 +389,12 @@ static struct nl80211_msg_conveyor * nl80211_send(
>   while (err > 0)
>   nl_recvmsgs(nls->nl_sock, cv->cb);
>  
> + if (err)
> + goto err;
> +

this code will never be reached due tot he while (err > 0) above


>   return &rcv;
>  
>  err:
> - nl_cb_put(cv->cb);
> - nlmsg_free(cv->msg);
>  

removing the freeeing code from a global helper is not a good idea and
will cause a leak.


John



>   return NULL;
>  }
> @@ -2016,16 +2017,21 @@ static int nl80211_get_scanlist_cb(struct nl_msg 
> *msg, void *arg)
>  
>  static int nl80211_get_scanlist_nl(const char *ifname, char *buf, int *len)
>  {
> - struct nl80211_msg_conveyor *req;
> + struct nl80211_msg_conveyor *req, *scan_res = NULL;
>   struct nl80211_scanlist sl = { .e = (struct iwinfo_scanlist_entry *)buf 
> };
>  
>   req = nl80211_msg(ifname, NL80211_CMD_TRIGGER_SCAN, 0);
>   if (req)
>   {
> - nl80211_send(req, NULL, NULL);
> + scan_res = nl80211_send(req, NULL, NULL);
>   nl80211_free(req);
>   }
>  
> + if (!scan_res)
> + {
> + return -1;
> + }
> +
>   nl80211_wait("nl80211", "scan", NL80211_CMD_NEW_SCAN_RESULTS);
>  
>   req = nl80211_msg(ifname, NL80211_CMD_GET_SCAN, NLM_F_DUMP);
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] ramips: add support for Planex DB-WRT01

2015-08-17 Thread John Crispin


On 10/08/2015 17:16, YuheiOKAWA wrote:
>  This patch add support for Planex DB-WRT01. DANBOARD route on
>  the MT7620A SoC with two Ethernet port and a 802.11n 2.4 GHz radio.
>  DANBOARD is Cartoon character.
> 
> Signed-off-by: YuheiOKAWA 



Hi,

i merged a huge 25 patch series today that cleans up the ramips target.
this unfortunately makes this patch not apply anymore. could you rebase
and resend your patch please ?

John
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [libubox] ulog: check if /dev/kmsg is special file

2015-08-17 Thread John Crispin
Hi,

On 16/08/2015 13:08, Sergiy Kibrik wrote:
> Race is possible in ulog_kmsg: if no /dev/kmsg exists
> (e.g. while /dev gets re-mounted) regular file created instead.
> From this point system goes without kernel logger:
> special character file can't be created anymore, all clients keep
> overwriting single message in regular file.
> 
> To avoid this we check if file we're going to write to is really
> character special and ensure it doesn't go away while we check.
> 
> Signed-off-by: Sergiy Kibrik 


the patch is quite invasive. how about just using "r+"

from the man page -->  "r+ Open for reading and writing.  The stream
is positioned at the beginning of the file."

could you try the following and not apply any other changes ?

John

-   if ((kmsg = fopen("/dev/kmsg", "w")) != NULL) {
+   if ((kmsg = fopen("/dev/kmsg", "r+")) != NULL) {






> ---
>  ulog.c | 17 -
>  1 file changed, 16 insertions(+), 1 deletion(-)
> 
> diff --git a/ulog.c b/ulog.c
> index 776a0c4..10d61da 100644
> --- a/ulog.c
> +++ b/ulog.c
> @@ -23,6 +23,9 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +#include 
> +#include 
>  
>  static int _ulog_channels = -1;
>  static int _ulog_facility = -1;
> @@ -89,8 +92,18 @@ static void ulog_defaults(void)
>  static void ulog_kmsg(int priority, const char *fmt, va_list ap)
>  {
>   FILE *kmsg;
> + int fd;
> + struct stat s;
> +
> + /* extra checks not to accidentally create regular file */
> + fd = open("/dev/kmsg", O_WRONLY);
> + if (fd < 0)
> + return;
> +
> + if (fstat(fd, &s) == 0 &&
> + s.st_mode & S_IFCHR &&
> + (kmsg = fdopen(fd, "w")) != NULL) {
>  
> - if ((kmsg = fopen("/dev/kmsg", "w")) != NULL) {
>   fprintf(kmsg, "<%u>", priority);
>  
>   if (_ulog_ident)
> @@ -99,6 +112,8 @@ static void ulog_kmsg(int priority, const char *fmt, 
> va_list ap)
>   vfprintf(kmsg, fmt, ap);
>   fclose(kmsg);
>   }
> +
> + close(fd);
>  }
>  
>  static void ulog_stdio(int priority, const char *fmt, va_list ap)
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] generic: crypto: remove IRQF_DISABLED

2015-08-17 Thread Dirk Neukirchen
no-op since 2.6.35
removed in Kernel 4.1
see https://lwn.net/Articles/380931/

Signed-off-by: Dirk Neukirchen 
---
 target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c | 2 +-
 target/linux/generic/files/crypto/ocf/pasemi/pasemi.c | 2 +-
 target/linux/generic/files/crypto/ocf/ubsec_ssb/ubsec_ssb.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c 
b/target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c
index e689f24..6fb9e09 100644
--- a/target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c
+++ b/target/linux/generic/files/crypto/ocf/kirkwood/cesa_ocf_drv.c
@@ -1203,7 +1203,7 @@ mv_cesa_ocf_init(struct platform_device *pdev)
 #endif
/* register interrupt */
if( request_irq( cesa_device.irq, cesa_interrupt_handler,
- (IRQF_DISABLED) , "cesa", &cesa_ocf_id) < 0) {
+ 0, "cesa", &cesa_ocf_id) < 0) {
printk("%s,%d: cannot assign irq %x\n", __FILE__, __LINE__, 
cesa_device.reg);
return EINVAL;
 }
diff --git a/target/linux/generic/files/crypto/ocf/pasemi/pasemi.c 
b/target/linux/generic/files/crypto/ocf/pasemi/pasemi.c
index 7bb62bc..216c578 100644
--- a/target/linux/generic/files/crypto/ocf/pasemi/pasemi.c
+++ b/target/linux/generic/files/crypto/ocf/pasemi/pasemi.c
@@ -767,7 +767,7 @@ static int pasemi_dma_setup_tx_resources(struct 
pasemi_softc *sc, int chan)
 
ring->irq = irq_create_mapping(NULL, sc->base_irq + chan);
ret = request_irq(ring->irq, (irq_handler_t)
- pasemi_intr, IRQF_DISABLED, ring->irq_name, sc);
+ pasemi_intr, 0, ring->irq_name, sc);
if (ret) {
printk(KERN_ERR DRV_NAME ": failed to hook irq %d ret %d\n",
   ring->irq, ret);
diff --git a/target/linux/generic/files/crypto/ocf/ubsec_ssb/ubsec_ssb.c 
b/target/linux/generic/files/crypto/ocf/ubsec_ssb/ubsec_ssb.c
index 6dc22c7..a81594e 100644
--- a/target/linux/generic/files/crypto/ocf/ubsec_ssb/ubsec_ssb.c
+++ b/target/linux/generic/files/crypto/ocf/ubsec_ssb/ubsec_ssb.c
@@ -499,7 +499,7 @@ ubsec_ssb_probe(struct ssb_device *sdev,
 }
 
 err = request_irq(sdev->irq, (irq_handler_t)ubsec_ssb_isr, 
-IRQF_DISABLED | IRQF_SHARED, DRV_MODULE_NAME, sdev);
+IRQF_SHARED, DRV_MODULE_NAME, sdev);
 if (err) {
 dev_err(sdev->dev, "Could not request irq\n");
 goto err_out_powerdown;
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] orion: remove IRQF_DISABLED

2015-08-17 Thread Dirk Neukirchen
no-op since 2.6.35
removed in Kernel 4.1
see https://lwn.net/Articles/380931/

Signed-off-by: Dirk Neukirchen 
---
 target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c 
b/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c
index b341ed6..658ea92 100644
--- a/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c
+++ b/target/linux/orion/files/arch/arm/mach-orion5x/dt2-setup.c
@@ -335,7 +335,7 @@ static void __init dt2_init(void)
platform_device_register(&dt2_leds);
 
if (request_irq(gpio_to_irq(DT2_PIN_GPIO_RESET), &dt2_reset_handler,
-   IRQF_DISABLED | IRQF_TRIGGER_LOW,
+   IRQF_TRIGGER_LOW,
"DT2: Reset button", NULL) < 0) {
 
printk("DT2: Reset Button IRQ %d not available\n",
@@ -343,7 +343,7 @@ static void __init dt2_init(void)
}
 
if (request_irq(gpio_to_irq(DT2_PIN_GPIO_POWER), &dt2_power_handler,
-   IRQF_DISABLED | IRQF_TRIGGER_LOW,
+   IRQF_TRIGGER_LOW,
"DT2: Power button", NULL) < 0) {
 
printk(KERN_DEBUG "DT2: Power Button IRQ %d not available\n",
-- 
2.5.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 00/25] ramips: massive code cleanups

2015-08-17 Thread Piotr Dymacz
2015-08-17 8:28 GMT+02:00 John Crispin :
> Hi,
>
> just merged the whole lot. thanks a lot. what do you want to do next
> lantiq or ar71xx ? :) personally i would prefer ar71xx ;)
> [...]

Hello John,

It seems that there are some people who don't like the changes (see
below), but they don't have enough courage to use their real name and
post their comments on the list.

I will back with answers for your and Michael Heimpold (I'm sorry, I
didn't spot your e-mail before!) questions in few days. Now I'm really
busy with other things.

Cheers,
Piotr Dymacz

---

2015-08-17 13:05 GMT+02:00 West Fuck :
> https://dev.openwrt.org/changeset/46617
>
> of all the bugs on related system you have choosen to change board and led
> names? why do you stick your nose into something that is not relevant? is it
> because your'e stupid fucking excuse for human being? you couldn't even make
> your uboot work without errors on some boards so why don't you stick to your
> own crap instead of acting like your're doing something
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Added WIZnet WizFi630A Platform based on Ralink RT5350

2015-08-17 Thread John Crispin
Hi Tobias,

Thanks for the patch. unfortunately its line mangled and white space
broken. also it seems you sent a HTML email. If you take a few minutes
to setup git, you can use "git send-email" to avoid these issues.

John


On 15/08/2015 10:08, Tobias Welz wrote:
> Hello OpenWrt Developers,
> 
> I added the WIZnet WizFi630A Platform to the trunk. The board is based
> on Ralink RT5350 in MiniPci Express Form Factor.
> 
> Kind regards
> Tobias Welz
> 
> 
> 
> From bd69bb513e36abda43e86f0eb64caf004260e415 Mon Sep 17 00:00:00 2001
> From: Tobias Welz 
> Date: Sat, 15 Aug 2015 02:30:34 +0200
> Subject: [PATCH] Added WIZnet WizFi630A Platform based on Ralink RT5350
> 
> 
> Signed-off-by: Tobias Welz 
> ---
>  .../linux/ramips/base-files/etc/board.d/02_network |6 +
>  target/linux/ramips/base-files/etc/diag.sh |3 +
>  target/linux/ramips/base-files/lib/ramips.sh   |3 +
>  .../ramips/base-files/lib/upgrade/platform.sh  |1 +
>  target/linux/ramips/dts/WIZFI630A.dts  |  304
> 
>  target/linux/ramips/image/Makefile |3 +
>  target/linux/ramips/rt305x/profiles/wizfi630a.mk   |   18 ++
>  7 files changed, 338 insertions(+)
>  create mode 100644 target/linux/ramips/dts/WIZFI630A.dts
>  create mode 100644 target/linux/ramips/rt305x/profiles/wizfi630a.mk
> 
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index da1854a..c211ab9 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -235,6 +235,7 @@ ramips_setup_interfaces()
>  ucidef_add_switch_vlan "switch0" "2" "4 6t"
>  ;;
>  
> +wizfi630a | \
>  y1s)
>  ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
>  ucidef_add_switch "switch0" "1" "1"
> @@ -297,6 +298,11 @@ ramips_setup_macs()
>  wan_mac=$(mtd_get_mac_binary factory 46)
>  ;;
>  
> +wizfi630a)
> +lan_mac=$(mtd_get_mac_binary factory 4)
> +wan_mac=$(mtd_get_mac_binary factory 40)
> +;;
> +
>  w306r-v20)
>  lan_mac=$(cat /sys/class/net/eth0/address)
>  wan_mac=$(macaddr_add "$lan_mac" 5)
> diff --git a/target/linux/ramips/base-files/etc/diag.sh
> b/target/linux/ramips/base-files/etc/diag.sh
> index e63f0df..3ffcc22 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -252,6 +252,9 @@ get_status_led() {
>  zte-q7)
>  status_led="zte:red:status"
>  ;;
> +wizfi630a)
> +status_led="wizfi630a::run"
> +;;
>  mzk-dp150n)
>  status_led="mzkdp150n:green:power"
>  ;;
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 7db6d37..474fdb8 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -430,6 +430,9 @@ ramips_board_detect() {
>  *"Planex MZK-DP150N")
>  name="mzk-dp150n"
>  ;;
> + *"WIZnet WizFi630A")
> +name="wizfi630a"
> +;;
>  *)
>  name="generic"
>  ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index 8221997..bdc6be9 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -105,6 +105,7 @@ platform_check_image() {
>  whr-300hp2 |\
>  whr-600d |\
>  whr-1166d |\
> +wizfi630a |\
>  wsr-600 |\
>  wl-330n | \
>  wl-330n3g | \
> diff --git a/target/linux/ramips/dts/WIZFI630A.dts
> b/target/linux/ramips/dts/WIZFI630A.dts
> new file mode 100644
> index 000..b3f655d
> --- /dev/null
> +++ b/target/linux/ramips/dts/WIZFI630A.dts
> @@ -0,0 +1,304 @@
> +/dts-v1/;
> +
> +/include/ "rt5350.dtsi"
> +
> +/ {
> +compatible = "wizfi630a", "ralink,rt5350-soc";
> +model = "WIZnet WizFi630A";
> +
> +chosen {
> +bootargs = "console=ttyS1,115200";
> +};
> +
> +palmbus@1000 {
> +gpio1: gpio@660 {
> +status = "okay";
> +};
> +
> +spi@b00 {
> +status = "okay";
> +
> +m25p80@0 {
> +#address-cells = <1>;
> +#size-cells = <1>;
> +compatible = "w25q128";
> +reg = <0>;
> +linux,modalias = "m25p80", "w25q128";
> +spi-max-frequency = <1000>;
> +
> +partition@0 {
> +label = "uboot";
> +reg = <0x0 0x3>;
> +read-only;
> +};
> +
> +partition@3 {
> +label = "uboot-env";
> +reg = <0x3 0x1>;
> +

Re: [OpenWrt-Devel] [PATCH] Added WIZnet WizFi630A Platform based on Ralink RT5350

2015-08-17 Thread Sedat Dilek
On Mon, Aug 17, 2015 at 1:24 PM, John Crispin  wrote:
> Hi Tobias,
>
> Thanks for the patch. unfortunately its line mangled and white space
> broken. also it seems you sent a HTML email. If you take a few minutes
> to setup git, you can use "git send-email" to avoid these issues.
>

On Debian/Ubuntu install "git send-email" or check your distubition's
docs and help...

   root# apt-get update && apt-get install git-email

Feel free to adapt my local dot-gitconfig...

$ cat ~/.gitconfig
[user]
name   = Sedat Dilek
email  = sedat.di...@gmail.com

[core]
abbrev = 12

[format]
subjectprefix = PATCH
signoff = false

[pretty]
fixes = Fixes: %h (\"%s\")

[push]
default = matching

[sendemail]
smtpserver = smtp.gmail.com
smtpserverport = 587
smtpencryption = tls
smtpuser = sedat.di...@gmail.com

Hope this helps.

- sed@ -


> John
>
>
> On 15/08/2015 10:08, Tobias Welz wrote:
>> Hello OpenWrt Developers,
>>
>> I added the WIZnet WizFi630A Platform to the trunk. The board is based
>> on Ralink RT5350 in MiniPci Express Form Factor.
>>
>> Kind regards
>> Tobias Welz
>>
>>
>>
>> From bd69bb513e36abda43e86f0eb64caf004260e415 Mon Sep 17 00:00:00 2001
>> From: Tobias Welz 
>> Date: Sat, 15 Aug 2015 02:30:34 +0200
>> Subject: [PATCH] Added WIZnet WizFi630A Platform based on Ralink RT5350
>>
>>
>> Signed-off-by: Tobias Welz 
>> ---
>>  .../linux/ramips/base-files/etc/board.d/02_network |6 +
>>  target/linux/ramips/base-files/etc/diag.sh |3 +
>>  target/linux/ramips/base-files/lib/ramips.sh   |3 +
>>  .../ramips/base-files/lib/upgrade/platform.sh  |1 +
>>  target/linux/ramips/dts/WIZFI630A.dts  |  304
>> 
>>  target/linux/ramips/image/Makefile |3 +
>>  target/linux/ramips/rt305x/profiles/wizfi630a.mk   |   18 ++
>>  7 files changed, 338 insertions(+)
>>  create mode 100644 target/linux/ramips/dts/WIZFI630A.dts
>>  create mode 100644 target/linux/ramips/rt305x/profiles/wizfi630a.mk
>>
>> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
>> b/target/linux/ramips/base-files/etc/board.d/02_network
>> index da1854a..c211ab9 100755
>> --- a/target/linux/ramips/base-files/etc/board.d/02_network
>> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
>> @@ -235,6 +235,7 @@ ramips_setup_interfaces()
>>  ucidef_add_switch_vlan "switch0" "2" "4 6t"
>>  ;;
>>
>> +wizfi630a | \
>>  y1s)
>>  ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
>>  ucidef_add_switch "switch0" "1" "1"
>> @@ -297,6 +298,11 @@ ramips_setup_macs()
>>  wan_mac=$(mtd_get_mac_binary factory 46)
>>  ;;
>>
>> +wizfi630a)
>> +lan_mac=$(mtd_get_mac_binary factory 4)
>> +wan_mac=$(mtd_get_mac_binary factory 40)
>> +;;
>> +
>>  w306r-v20)
>>  lan_mac=$(cat /sys/class/net/eth0/address)
>>  wan_mac=$(macaddr_add "$lan_mac" 5)
>> diff --git a/target/linux/ramips/base-files/etc/diag.sh
>> b/target/linux/ramips/base-files/etc/diag.sh
>> index e63f0df..3ffcc22 100644
>> --- a/target/linux/ramips/base-files/etc/diag.sh
>> +++ b/target/linux/ramips/base-files/etc/diag.sh
>> @@ -252,6 +252,9 @@ get_status_led() {
>>  zte-q7)
>>  status_led="zte:red:status"
>>  ;;
>> +wizfi630a)
>> +status_led="wizfi630a::run"
>> +;;
>>  mzk-dp150n)
>>  status_led="mzkdp150n:green:power"
>>  ;;
>> diff --git a/target/linux/ramips/base-files/lib/ramips.sh
>> b/target/linux/ramips/base-files/lib/ramips.sh
>> index 7db6d37..474fdb8 100755
>> --- a/target/linux/ramips/base-files/lib/ramips.sh
>> +++ b/target/linux/ramips/base-files/lib/ramips.sh
>> @@ -430,6 +430,9 @@ ramips_board_detect() {
>>  *"Planex MZK-DP150N")
>>  name="mzk-dp150n"
>>  ;;
>> + *"WIZnet WizFi630A")
>> +name="wizfi630a"
>> +;;
>>  *)
>>  name="generic"
>>  ;;
>> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
>> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
>> index 8221997..bdc6be9 100755
>> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
>> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
>> @@ -105,6 +105,7 @@ platform_check_image() {
>>  whr-300hp2 |\
>>  whr-600d |\
>>  whr-1166d |\
>> +wizfi630a |\
>>  wsr-600 |\
>>  wl-330n | \
>>  wl-330n3g | \
>> diff --git a/target/linux/ramips/dts/WIZFI630A.dts
>> b/target/linux/ramips/dts/WIZFI630A.dts
>> new file mode 100644
>> index 000..b3f655d
>> --- /dev/null
>> +++ b/target/linux/ramips/dts/WIZFI630A.dts
>> @@ -0,0 +1,304 @@
>> +/dts-v1/;
>> +
>> +/include/ "rt5350.dtsi"
>> +
>> +/ {
>> +compatible = "wizfi630a", "ralink,rt5350-soc";
>> +model = "WIZnet WizFi630A";
>> +
>> +chosen {
>> +bootargs = "console=ttyS1,115200";
>> + 

Re: [OpenWrt-Devel] [PATCH v2 00/25] ramips: massive code cleanups

2015-08-17 Thread Sławomir Demeszko

W dniu 17.08.2015 o 13:24, Piotr Dymacz pisze:
> It seems that there are some people who don't like the changes

Hi.

Don't bother that kind of people. There will be always someone who like mess. Cleanup is 
always good, especially for other people, who need to work with that code later. OpenWRT 
developers introduced some rules for patches due the same reason. Thanks for your work.

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] Added WIZnet WizFi630A Platform based on Ralink RT5350

2015-08-17 Thread Tobias Welz

Hello Sedat,

thanks for the hints, I had already git installed but i did not know 
about git send-email.

I'll send the reworked patch via git send-email later.
Maybe it would be a good idea to mention git send-email in the wiki 
also: https://dev.openwrt.org/wiki/SubmittingPatches


Kind regards
Tobias

 Original Message 
Subject: Re: [OpenWrt-Devel] [PATCH] Added WIZnet WizFi630A Platform 
based on Ralink RT5350

From: Sedat Dilek 
To: John Crispin 
Cc: Tobias Welz , openwrt-devel@lists.openwrt.org
Date: 17.8.2015 13:41:21

On Mon, Aug 17, 2015 at 1:24 PM, John Crispin  wrote:

Hi Tobias,

Thanks for the patch. unfortunately its line mangled and white space
broken. also it seems you sent a HTML email. If you take a few minutes
to setup git, you can use "git send-email" to avoid these issues.


On Debian/Ubuntu install "git send-email" or check your distubition's
docs and help...

root# apt-get update && apt-get install git-email

Feel free to adapt my local dot-gitconfig...

$ cat ~/.gitconfig
[user]
 name   = Sedat Dilek
 email  = sedat.di...@gmail.com

[core]
 abbrev = 12

[format]
 subjectprefix = PATCH
 signoff = false

[pretty]
 fixes = Fixes: %h (\"%s\")

[push]
 default = matching

[sendemail]
 smtpserver = smtp.gmail.com
 smtpserverport = 587
 smtpencryption = tls
 smtpuser = sedat.di...@gmail.com

Hope this helps.

- sed@ -



 John


On 15/08/2015 10:08, Tobias Welz wrote:

Hello OpenWrt Developers,

I added the WIZnet WizFi630A Platform to the trunk. The board is based
on Ralink RT5350 in MiniPci Express Form Factor.

Kind regards
Tobias Welz



 From bd69bb513e36abda43e86f0eb64caf004260e415 Mon Sep 17 00:00:00 2001
From: Tobias Welz 
Date: Sat, 15 Aug 2015 02:30:34 +0200
Subject: [PATCH] Added WIZnet WizFi630A Platform based on Ralink RT5350


Signed-off-by: Tobias Welz 
---
  .../linux/ramips/base-files/etc/board.d/02_network |6 +
  target/linux/ramips/base-files/etc/diag.sh |3 +
  target/linux/ramips/base-files/lib/ramips.sh   |3 +
  .../ramips/base-files/lib/upgrade/platform.sh  |1 +
  target/linux/ramips/dts/WIZFI630A.dts  |  304

  target/linux/ramips/image/Makefile |3 +
  target/linux/ramips/rt305x/profiles/wizfi630a.mk   |   18 ++
  7 files changed, 338 insertions(+)
  create mode 100644 target/linux/ramips/dts/WIZFI630A.dts
  create mode 100644 target/linux/ramips/rt305x/profiles/wizfi630a.mk

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
b/target/linux/ramips/base-files/etc/board.d/02_network
index da1854a..c211ab9 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -235,6 +235,7 @@ ramips_setup_interfaces()
  ucidef_add_switch_vlan "switch0" "2" "4 6t"
  ;;

+wizfi630a | \
  y1s)
  ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
  ucidef_add_switch "switch0" "1" "1"
@@ -297,6 +298,11 @@ ramips_setup_macs()
  wan_mac=$(mtd_get_mac_binary factory 46)
  ;;

+wizfi630a)
+lan_mac=$(mtd_get_mac_binary factory 4)
+wan_mac=$(mtd_get_mac_binary factory 40)
+;;
+
  w306r-v20)
  lan_mac=$(cat /sys/class/net/eth0/address)
  wan_mac=$(macaddr_add "$lan_mac" 5)
diff --git a/target/linux/ramips/base-files/etc/diag.sh
b/target/linux/ramips/base-files/etc/diag.sh
index e63f0df..3ffcc22 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -252,6 +252,9 @@ get_status_led() {
  zte-q7)
  status_led="zte:red:status"
  ;;
+wizfi630a)
+status_led="wizfi630a::run"
+;;
  mzk-dp150n)
  status_led="mzkdp150n:green:power"
  ;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh
b/target/linux/ramips/base-files/lib/ramips.sh
index 7db6d37..474fdb8 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -430,6 +430,9 @@ ramips_board_detect() {
  *"Planex MZK-DP150N")
  name="mzk-dp150n"
  ;;
+ *"WIZnet WizFi630A")
+name="wizfi630a"
+;;
  *)
  name="generic"
  ;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 8221997..bdc6be9 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -105,6 +105,7 @@ platform_check_image() {
  whr-300hp2 |\
  whr-600d |\
  whr-1166d |\
+wizfi630a |\
  wsr-600 |\
  wl-330n | \
  wl-330n3g | \
diff --git a/target/linux/ramips/dts/WIZFI630A.dts
b/target/linux/ramips/dts/WIZFI630A.dts
new file mode 100644
index 000..b3f655d
--- /dev/null
+++ b/target/li

[OpenWrt-Devel] [PATCH 1/2] lua: use pkg-config built in module to search for alternatives

2015-08-17 Thread Karl Palsson
From: Karl Palsson 

Different distributions have different names for the lua 5.1 package.
Use cmake's built in pkg-config support to search for the first one,
rather than running it explicitly and searching for a single version.

Signed-off-by: Karl Palsson 
---

There's a line further down that attempts to invoke "lua" that also
fails if you have multiple versions of lua installed.  I'm not sure
how best to fix that though, other than to just remove it as a check.

Perhaps if you you want to enable/disable the lua building, use cmake
features for that, rather than testing for an executable lua?

 lua/CMakeLists.txt | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/lua/CMakeLists.txt b/lua/CMakeLists.txt
index 10c6dc1..34c9ab1 100644
--- a/lua/CMakeLists.txt
+++ b/lua/CMakeLists.txt
@@ -5,14 +5,7 @@ PROJECT(uloop C)
 SET(CMAKE_INSTALL_PREFIX /)
 
 IF(NOT LUA_CFLAGS)
-   FIND_PROGRAM(PKG_CONFIG pkg-config)
-   IF(PKG_CONFIG)
-   EXECUTE_PROCESS(
-   COMMAND pkg-config --silence-errors --cflags lua5.1
-   OUTPUT_VARIABLE LUA_CFLAGS
-   OUTPUT_STRIP_TRAILING_WHITESPACE
-   )
-   ENDIF()
+   pkg_search_module(LUA lua5.1 lua-5.1)
 ENDIF()
 
 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -g3 -I.. ${LUA_CFLAGS})
-- 
2.1.0
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [netifd] enable MULTICAST on GRE

2015-08-17 Thread Nick Podolak
On Sat, Aug 15, 2015 at 3:25 AM, Hans Dedecker  wrote:

> It would be better to make this a device setting like promiscuous
>> mode,macaddr, etc ... so it can be configured via UCI for every device and
>> thus not only restricted for GRE
>>
>
> Hans
>

You make an excellent point and I agree, but I'm unsure of some of the
details.

Is promisc mode controllable from UCI?  I didn't think it was but I can't
tell from looking at these parts of netifd.

Help me understand the extent of this implementation.  Looks like each of
these would need modification.  Did i miss anything?
device.c
  static const struct blobmsg_policy dev_attrs[__DEV_ATTR_MAX] = {
  device_merge_settings(struct device *dev, struct device_settings *n)
  device_init_settings(struct device *dev, struct blob_attr **tb)
  device_dump_status(struct blob_buf *b, struct device *dev)
system-linux.c
  system_if_get_settings(struct device *dev, struct device_settings *s)
  system_if_apply_settings(struct device *dev, struct device_settings *s,
unsigned int apply_mask)

UCI is all passthrough, right? nothing there would have to change?

-Nick
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] toolchain/uClibc: add support of uClibc-ng

2015-08-17 Thread Alexey Brodkin
uClibc-ng is a spin-off of original uClibc, see http://www.uclibc-ng.org/

We try to regularly add changes from uClibc to uClibc-ng.
We even sent patches and bug reports to the uClibc mailing list.
The config file is compatible between uClibc-ng 1.0 and uClibc git master.
This might change in the future.

Our main goal is to provide regularly a stable and tested release
to make embedded system developers happy.

The main advantage of uClibc-ng over olde good uClibc is regular releases
so there's no need to keep tons of patches on top of years old
0.9.33.2

Build-tested for
 [1] ARM: Sunxi generic
 [2] MIPS: Netgear WNDR3600/3700/3800

Run-tested for [yet out of the tree] Synopsys Designware ARC AXS101.

Signed-off-by: Alexey Brodkin 
Cc: Waldemar Brodkorb 
Cc: Mathieu Olivari 
Cc: Felix Fietkau 
Cc: John Crispin 
---
 toolchain/uClibc/Config.in |   4 +
 toolchain/uClibc/Config.version|   4 +
 toolchain/uClibc/common.mk |  15 +-
 toolchain/uClibc/config-ng-1.0.5/arm   |   8 +
 toolchain/uClibc/config-ng-1.0.5/armeb |   8 +
 toolchain/uClibc/config-ng-1.0.5/common| 223 +
 toolchain/uClibc/config-ng-1.0.5/debug |   6 +
 toolchain/uClibc/config-ng-1.0.5/i386  |  21 ++
 toolchain/uClibc/config-ng-1.0.5/i686  |  21 ++
 toolchain/uClibc/config-ng-1.0.5/m68k  |   6 +
 toolchain/uClibc/config-ng-1.0.5/mips  |  18 ++
 toolchain/uClibc/config-ng-1.0.5/mips64|  18 ++
 toolchain/uClibc/config-ng-1.0.5/mips64.32 |  19 ++
 toolchain/uClibc/config-ng-1.0.5/mips64.64 |  19 ++
 toolchain/uClibc/config-ng-1.0.5/mips64.n32|  19 ++
 toolchain/uClibc/config-ng-1.0.5/mips64el  |  18 ++
 toolchain/uClibc/config-ng-1.0.5/mips64el.32   |  19 ++
 toolchain/uClibc/config-ng-1.0.5/mips64el.64   |  19 ++
 toolchain/uClibc/config-ng-1.0.5/mips64el.n32  |  19 ++
 toolchain/uClibc/config-ng-1.0.5/mipsel|  18 ++
 toolchain/uClibc/config-ng-1.0.5/mipsel.cobalt |  18 ++
 toolchain/uClibc/config-ng-1.0.5/powerpc   |   6 +
 toolchain/uClibc/config-ng-1.0.5/powerpc.e500  |   6 +
 toolchain/uClibc/config-ng-1.0.5/sparc |   8 +
 toolchain/uClibc/config-ng-1.0.5/sparc.leon|   8 +
 toolchain/uClibc/config-ng-1.0.5/x86_64|   6 +
 ...backward_compatibility_symlink_by_default.patch |  32 +++
 27 files changed, 583 insertions(+), 3 deletions(-)
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/arm
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/armeb
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/common
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/debug
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/i386
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/i686
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/m68k
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips64
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips64.32
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips64.64
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips64.n32
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips64el
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips64el.32
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips64el.64
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mips64el.n32
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mipsel
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/mipsel.cobalt
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/powerpc
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/powerpc.e500
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/sparc
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/sparc.leon
 create mode 100644 toolchain/uClibc/config-ng-1.0.5/x86_64
 create mode 100644 
toolchain/uClibc/patches-ng-1.0.5/0001-ldso_install_backward_compatibility_symlink_by_default.patch

diff --git a/toolchain/uClibc/Config.in b/toolchain/uClibc/Config.in
index 08ea00a..c923bc0 100644
--- a/toolchain/uClibc/Config.in
+++ b/toolchain/uClibc/Config.in
@@ -11,6 +11,10 @@ choice
select UCLIBC_VERSION_0_9_33
bool "uClibc 0.9.33.2"
 
+   config UCLIBC_USE_VERSION_NG
+   select UCLIBC_VERSION_NG
+   bool "uClibc-ng"
+
 endchoice
 
 # Debug version.
diff --git a/toolchain/uClibc/Config.version b/toolchain/uClibc/Config.version
index dd302f2..7238d9a 100644
--- a/toolchain/uClibc/Config.version
+++ b/toolchain/uClibc/Config.version
@@ -2,8 +2,12 @@ config UCLIBC_VERSION
string
depends on USE_UCLIBC
default "0.9.33.2"   if UCLIBC_VERSION_0_9_33
+   default "1.0.5"  if UCLIBC_VERSION_NG
default "0.9.33.2"
 
 config UCLIBC_VERSION_0_9_33
default y if !TOOLCHAINOPTS && USE_UCLIBC
bool
+
+

[OpenWrt-Devel] [PATCH 1/4] lldpd: remove obsolete/unsupported lldpctl call

2015-08-17 Thread Alexandru Ardelean
This call is no longer supported.
Maybe a come-back for it would be to use a config /etc/lldpd.conf
or /etc/lldpd.d/.conf

Signed-off-by: Alexandru Ardelean 
---
 package/network/services/lldpd/files/lldpd.init | 5 -
 1 file changed, 5 deletions(-)

diff --git a/package/network/services/lldpd/files/lldpd.init 
b/package/network/services/lldpd/files/lldpd.init
index 40f2611..4b49cbd 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -60,11 +60,6 @@ start() {
service_start /usr/sbin/lldpd $args \
${lldp_class:+ -M $lldp_class} \
${lldp_description:+ -S "$lldp_description"}
-
-   [ -n "$lldp_location" ] && {
-   sleep 1
-   /usr/sbin/lldpctl -L "$lldp_location" > /dev/null 2>&1
-   }
 }
 
 stop() {
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] lldpd: conversion of init script to procd format

2015-08-17 Thread Alexandru Ardelean
And add respawn param (the main reason for this conversion).

Signed-off-by: Alexandru Ardelean 
---
 package/network/services/lldpd/files/lldpd.init | 31 ++---
 1 file changed, 18 insertions(+), 13 deletions(-)

diff --git a/package/network/services/lldpd/files/lldpd.init 
b/package/network/services/lldpd/files/lldpd.init
index bd957b6..fca0ebf 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -3,7 +3,7 @@
 
 START=90
 
-SERVICE_USE_PID=1
+USE_PROCD=1
 
 find_release_info()
 {
@@ -14,7 +14,7 @@ find_release_info()
echo "${DISTRIB_DESCRIPTION:-Unknown OpenWrt release} @ $(cat 
/proc/sys/kernel/hostname)"
 }
 
-start() {
+start_service() {
. /lib/functions/network.sh
 
local enable_cdp
@@ -50,19 +50,24 @@ start() {
mkdir -p /var/run/lldp
chown lldp:lldp /var/run/lldp
 
-   [ -n "$ifnames" ] && append args "-I $ifnames"
-   [ $enable_cdp -gt 0 ] && append args '-c'
-   [ $enable_fdp -gt 0 ] && append args '-f'
-   [ $enable_sonmp -gt 0 ] && append args '-s'
-   [ $enable_edp -gt 0 ] && append args '-e'
-   [ $readonly_mode -gt 0 ] && append args '-r'
+   procd_open_instance
+   procd_set_param command /usr/sbin/lldpd
+   procd_append_param command -d # don't daemonize, procd will handle that 
for us
 
-   service_start /usr/sbin/lldpd $args \
-   ${lldp_class:+ -M $lldp_class} \
-   ${lldp_description:+ -S "$lldp_description"}
+   [ -n "$ifnames" ] && procd_append_param command "-I $ifnames"
+   [ $enable_cdp -gt 0 ] && procd_append_param command '-c'
+   [ $enable_fdp -gt 0 ] && procd_append_param command '-f'
+   [ $enable_sonmp -gt 0 ] && procd_append_param command '-s'
+   [ $enable_edp -gt 0 ] && procd_append_param command '-e'
+   [ $readonly_mode -gt 0 ] && procd_append_param command '-r'
+   [ -n "$lldp_class" ] && procd_append_param command "-M $lldp_class"
+   [ -n "$lldp_description" ] && procd_append_param command "-S 
$lldp_description"
+
+   # set auto respawn behavior
+   procd_set_param respawn
+   procd_close_instance
 }
 
-stop() {
-   service_stop /usr/sbin/lldpd
+stop_service() {
rm -f /var/run/lldpd.socket /var/run/lldpd.pid
 }
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 4/4] lldpd: add extra respawn params

2015-08-17 Thread Alexandru Ardelean
Signed-off-by: Alexandru Ardelean 
---
 package/network/services/lldpd/files/lldpd.init | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/network/services/lldpd/files/lldpd.init 
b/package/network/services/lldpd/files/lldpd.init
index fca0ebf..278dbaf 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -65,6 +65,9 @@ start_service() {
 
# set auto respawn behavior
procd_set_param respawn
+   procd_append_param respawn 3600
+   procd_append_param respawn 5
+   procd_append_param respawn -1
procd_close_instance
 }
 
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] lldpd: move /var/run creation + chmod earlier

2015-08-17 Thread Alexandru Ardelean
Signed-off-by: Alexandru Ardelean 
---
 package/network/services/lldpd/files/lldpd.init | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/lldpd/files/lldpd.init 
b/package/network/services/lldpd/files/lldpd.init
index 4b49cbd..bd957b6 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -47,6 +47,9 @@ start() {
fi
done
 
+   mkdir -p /var/run/lldp
+   chown lldp:lldp /var/run/lldp
+
[ -n "$ifnames" ] && append args "-I $ifnames"
[ $enable_cdp -gt 0 ] && append args '-c'
[ $enable_fdp -gt 0 ] && append args '-f'
@@ -54,9 +57,6 @@ start() {
[ $enable_edp -gt 0 ] && append args '-e'
[ $readonly_mode -gt 0 ] && append args '-r'
 
-   mkdir -p /var/run/lldp
-   chown lldp:lldp /var/run/lldp
-
service_start /usr/sbin/lldpd $args \
${lldp_class:+ -M $lldp_class} \
${lldp_description:+ -S "$lldp_description"}
-- 
2.1.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] ar71xx: RB435G PCI does not support minipci sata module (PER-C20S)

2015-08-17 Thread Marek Behun
Hi,
I recently acquired a RouterBoard 435G. There are 5 minipci slots on
this board, so I bought the PER-C20S minipci sata module to add SATA
storage to the board. The PER-C20S is supported by kernel module
sata_sil. RouterBoard 435G is an ar71xx board, the PCI setup is done in
arch/mips/ath79/mach-rb4xx.c.

I can't understand why wireless minipci cards do work (I am using
Mikrotik R52N-M) but when I connect the PER-C20S module to the minipci
slot, it does not work, and neither does the wireless card when the
sata module is connected, as if the sata module broke the PCI drivers
somehow.

Is the PCI subsystem on this board supported only for wireless cards?

Thank you.

MB
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [kernel] at91: fix usb rate backport patch tab mangle

2015-08-17 Thread Ben Whitten
The patch submitted in [46649] was mangled in the use of gmails webmail 
interface, tabs replaced with spaces, resulting in a patch which dit not apply.
This should fix the issue, sorry for the noise.

Signed-off-by: Ben Whitten 

---
 .../201-ARM-at91-usb-determine_rate-backport.patch | 28 +++---
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git 
a/target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch 
b/target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch
index 4fc22ab..d083628 100644
--- a/target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch
+++ b/target/linux/at91/patches/201-ARM-at91-usb-determine_rate-backport.patch
@@ -2,19 +2,19 @@
 +++ b/drivers/clk/at91/clk-usb.c
 @@ -59,7 +59,7 @@ static unsigned long at91sam9x5_clk_usb_
  static long at91sam9x5_clk_usb_determine_rate(struct clk_hw *hw,
-   unsigned long rate,
-   unsigned long *best_parent_rate,
--  struct clk_hw **best_parent_hw)
-+  struct clk **best_parent_clk)
+ unsigned long rate,
+ unsigned long *best_parent_rate,
+-struct clk_hw **best_parent_hw)
++struct clk **best_parent_clk)
  {
- struct clk *parent = NULL;
- long best_rate = -EINVAL;
+   struct clk *parent = NULL;
+   long best_rate = -EINVAL;
 @@ -91,7 +91,7 @@ static long at91sam9x5_clk_usb_determine
- best_rate = tmp_rate;
- best_diff = tmp_diff;
- *best_parent_rate = tmp_parent_rate;
--*best_parent_hw = __clk_get_hw(parent);
-+*best_parent_clk = parent;
- }
-
- if (!best_diff || tmp_rate < rate)
+   best_rate = tmp_rate;
+   best_diff = tmp_diff;
+   *best_parent_rate = tmp_parent_rate;
+-  *best_parent_hw = __clk_get_hw(parent);
++  *best_parent_clk = parent;
+   }
+ 
+   if (!best_diff || tmp_rate < rate)
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Recommended settings ip6 DNS server / dnsmasq

2015-08-17 Thread Steven Barth
I'm not sure what you are trying to accomplish. If you are connecting a router 
with a default
OpenWrt image with default configuration to an ISP or IPv6 router which offers 
prefix delegation,
everything works out of the box including client configuration. You don't need 
to touch a single
config file.

OpenWrt serves stateless and stateful addresses to clients by default, the 
combination of
option duid and option hostid should also work to change the hostid (I'm using 
it right now).

So could you please explain what is special about the freebox as an uplink 
(sorry I don't
speak french so I can't decode your wiki page)?

What is currently working and what is broken for you? What addresses do your 
clients get?



Cheers,

Steven
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] ar71xx: RB435G PCI does not support minipci sata module (PER-C20S)

2015-08-17 Thread Jo-Philipp Wich
Hi.

> Is the PCI subsystem on this board supported only for wireless cards?

Yes. The hardware controller cannot handle PCI I/O resources, therefore
only a subset of available miniPCI cards do work with it.

Anything requiring I/O resources is a no-go.

HTH,
Jow
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Recommended settings ip6 DNS server / dnsmasq

2015-08-17 Thread Jean-Michel Pouré - GOOZE
Dear Steven,

Thank you for answering.

> I'm not sure what you are trying to accomplish. If you are connecting 
> a router with a default
> OpenWrt image with default configuration to an ISP or IPv6 router 
> which offers prefix delegation,
> everything works out of the box including client configuration. You 
> don't need to touch a single
> config file.

Prefix delegation works only with a freebox model v6 or Android with
NextHop support. This is probably a limitation on the ISP side.

> OpenWrt serves stateless and stateful addresses to clients by 
> default, the combination of
> option duid and option hostid should also work to change the hostid 
> (I'm using it right now).

We tested with success :
* manual IPv6 settings,
* stateless delegation.

Stateful IPV6 delegation does not work.

> So could you please explain what is special about the freebox as an 
> uplink (sorry I don't
> speak french so I can't decode your wiki page)?

I published the setting here, no need to speak French:
http://wiki.openwrt.org/doc/howto/freebox#configuration_des_clients_ipv
6

Could you tell us more about the setting for stateful delegation? I
would like use the less intrusive settings, including a stock OpenWRT
with no additional package. How can this be done?

How do you set duid and option hostid ? It is unclear which version of
DNSmasq to use, Should we use two configurations config host: one for
ipv4 and one for ipv6.

Here are my settings:


config dnsmasq
option domainneeded '0'
option boguspriv '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option localservice '1'

config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option ra 'server'
option dhcpv6 'server'

config dhcp 'wan'
option interface 'wan'
option ignore '1'

config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'

config host
option name 'sony-vaio'
option ip '192.168.1.xxx'
option mac '54:42:49:xx:xx:xx'

#config host
#option name 'sony-vaio'
#option ip '2a01:e35:87d8:::3'
#option duid '0004901071a15f278795aa0dd83bde8b250x'
#option hostid '0003'

It could be nice if there was official documentation about stateful
adressing  on the WIKI here:
http://wiki.openwrt.org/doc/uci/network

Kind regards,
Gnutella

smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] ramips: add support for Planex DB-WRT01

2015-08-17 Thread YuheiOKAWA
 This patch add support for Planex DB-WRT01. DANBOARD route on
 the MT7620A SoC with two Ethernet port and a 802.11n 2.4 GHz radio.
 DANBOARD is Cartoon character.

Signed-off-by: YuheiOKAWA 
---
 target/linux/ramips/base-files/etc/board.d/01_leds |  3 +
 .../linux/ramips/base-files/etc/board.d/02_network |  1 +
 target/linux/ramips/base-files/etc/diag.sh |  1 +
 target/linux/ramips/base-files/lib/ramips.sh   |  3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |  1 +
 target/linux/ramips/dts/DB-WRT01.dts   | 99 ++
 target/linux/ramips/image/Makefile |  2 +
 7 files changed, 110 insertions(+)
 create mode 100644 target/linux/ramips/dts/DB-WRT01.dts

diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
b/target/linux/ramips/base-files/etc/board.d/01_leds
index 71cf3ac..a9959e3 100755
--- a/target/linux/ramips/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/base-files/etc/board.d/01_leds
@@ -87,6 +87,9 @@ d105)
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
set_usb_led "$board:green:usb"
;;
+db-wrt01)
+   ucidef_set_led_default "power" "power" "$board:orange:power" "1"
+   ;;
 dcs-930l-b1)
ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
ucidef_set_led_netdev "wifi" "WiFi" "$board:blue:wps"
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network
index 6a2f042..02cd682 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -61,6 +61,7 @@ ramips_setup_interfaces()
;;
3g-6200n|\
ai-br100|\
+   db-wrt01|\
dir-300-b7|\
dir-320-b1|\
dir-610-a1|\
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh
index a4911b0..f886b5d 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -94,6 +94,7 @@ get_status_led() {
y1s)
status_led="$board:blue:power"
;;
+   db-wrt01|\
esr-9753)
status_led="$board:orange:power"
;;
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh
index 5cafd45..5b6808e 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -97,6 +97,9 @@ ramips_board_detect() {
*"DAP-1350")
name="dap-1350"
;;
+   *"DB-WRT01")
+   name="db-wrt01"
+   ;;
*"DCS-930")
name="dcs-930"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 53e7070..844ed5d 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -36,6 +36,7 @@ platform_check_image() {
cf-wr800n|\
d105|\
dap-1350|\
+   db-wrt01|\
dcs-930|\
dcs-930l-b1|\
dir-300-b1|\
diff --git a/target/linux/ramips/dts/DB-WRT01.dts 
b/target/linux/ramips/dts/DB-WRT01.dts
new file mode 100644
index 000..a8953e9
--- /dev/null
+++ b/target/linux/ramips/dts/DB-WRT01.dts
@@ -0,0 +1,99 @@
+/dts-v1/;
+
+/include/ "mt7620a.dtsi"
+
+/ {
+   compatible = "ralink,mt7620a-soc";
+   model = "Planex DB-WRT01";
+
+   palmbus@1000 {
+   gpio1: gpio@638 {
+   status = "okay";
+   };
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "en25q64";
+   reg = <0 0>;
+   linux,modalias = "m25p80", "mx25l6405d";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "u-boot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "u-boot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+ 

Re: [OpenWrt-Devel] [PATCH] ramips: add support for Planex DB-WRT01

2015-08-17 Thread @SRCHACK . ORG

Hi,

I re-wrote the patch.
And it re-sent a patch.


On 2015/08/17 19:31, John Crispin wrote:



On 10/08/2015 17:16, YuheiOKAWA wrote:

  This patch add support for Planex DB-WRT01. DANBOARD route on
  the MT7620A SoC with two Ethernet port and a 802.11n 2.4 GHz radio.
  DANBOARD is Cartoon character.

Signed-off-by: YuheiOKAWA 




Hi,

i merged a huge 25 patch series today that cleans up the ramips target.
this unfortunately makes this patch not apply anymore. could you rebase
and resend your patch please ?

John




--
--
@SRCHACK.ORG
tochiro.srch...@gmail.com
http://www.srchack.org/
--
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ramips: add support for Planex DB-WRT01

2015-08-17 Thread Piotr Dymacz
Hello,

Please, see my comments inline.

2015-08-17 19:20 GMT+02:00 YuheiOKAWA :
>  This patch add support for Planex DB-WRT01. DANBOARD route on
>  the MT7620A SoC with two Ethernet port and a 802.11n 2.4 GHz radio.
>  DANBOARD is Cartoon character.
>
> Signed-off-by: YuheiOKAWA 
> ---
>  target/linux/ramips/base-files/etc/board.d/01_leds |  3 +
>  .../linux/ramips/base-files/etc/board.d/02_network |  1 +
>  target/linux/ramips/base-files/etc/diag.sh |  1 +
>  target/linux/ramips/base-files/lib/ramips.sh   |  3 +
>  .../ramips/base-files/lib/upgrade/platform.sh  |  1 +
>  target/linux/ramips/dts/DB-WRT01.dts   | 99 
> ++
>  target/linux/ramips/image/Makefile |  2 +
>  7 files changed, 110 insertions(+)
>  create mode 100644 target/linux/ramips/dts/DB-WRT01.dts
>
> diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds 
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> index 71cf3ac..a9959e3 100755
> --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> @@ -87,6 +87,9 @@ d105)
> ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
> set_usb_led "$board:green:usb"
> ;;
> +db-wrt01)
> +   ucidef_set_led_default "power" "power" "$board:orange:power" "1"
> +   ;;
>  dcs-930l-b1)
> ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
> ucidef_set_led_netdev "wifi" "WiFi" "$board:blue:wps"
> diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
> b/target/linux/ramips/base-files/etc/board.d/02_network
> index 6a2f042..02cd682 100755
> --- a/target/linux/ramips/base-files/etc/board.d/02_network
> +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> @@ -61,6 +61,7 @@ ramips_setup_interfaces()
> ;;
> 3g-6200n|\
> ai-br100|\
> +   db-wrt01|\
> dir-300-b7|\
> dir-320-b1|\
> dir-610-a1|\
> diff --git a/target/linux/ramips/base-files/etc/diag.sh 
> b/target/linux/ramips/base-files/etc/diag.sh
> index a4911b0..f886b5d 100644
> --- a/target/linux/ramips/base-files/etc/diag.sh
> +++ b/target/linux/ramips/base-files/etc/diag.sh
> @@ -94,6 +94,7 @@ get_status_led() {
> y1s)
> status_led="$board:blue:power"
> ;;
> +   db-wrt01|\
> esr-9753)
> status_led="$board:orange:power"
> ;;
> diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
> b/target/linux/ramips/base-files/lib/ramips.sh
> index 5cafd45..5b6808e 100755
> --- a/target/linux/ramips/base-files/lib/ramips.sh
> +++ b/target/linux/ramips/base-files/lib/ramips.sh
> @@ -97,6 +97,9 @@ ramips_board_detect() {
> *"DAP-1350")
> name="dap-1350"
> ;;
> +   *"DB-WRT01")
> +   name="db-wrt01"
> +   ;;
> *"DCS-930")
> name="dcs-930"
> ;;
> diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> index 53e7070..844ed5d 100755
> --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> @@ -36,6 +36,7 @@ platform_check_image() {
> cf-wr800n|\
> d105|\
> dap-1350|\
> +   db-wrt01|\
> dcs-930|\
> dcs-930l-b1|\
> dir-300-b1|\
> diff --git a/target/linux/ramips/dts/DB-WRT01.dts 
> b/target/linux/ramips/dts/DB-WRT01.dts
> new file mode 100644
> index 000..a8953e9
> --- /dev/null
> +++ b/target/linux/ramips/dts/DB-WRT01.dts
> @@ -0,0 +1,99 @@
> +/dts-v1/;
> +
> +/include/ "mt7620a.dtsi"
> +
> +/ {
> +   compatible = "ralink,mt7620a-soc";
> +   model = "Planex DB-WRT01";
> +
> +   palmbus@1000 {
> +   gpio1: gpio@638 {
> +   status = "okay";
> +   };
> +
> +   spi@b00 {
> +   status = "okay";
> +
> +   m25p80@0 {
> +   #address-cells = <1>;
> +   #size-cells = <1>;
> +   compatible = "en25q64";
> +   reg = <0 0>;
> +   linux,modalias = "m25p80", "mx25l6405d";
> +   spi-max-frequency = <1000>;
> +
> +   partition@0 {
> +   label = "u-boot";
> +   reg = <0x0 0x3>;
> +   read-only;
> +   };
> +
> +   partition@3 {
> +   label = "u-boot-env";
> +   reg = <0x3 0x1>;
> +   read-only;
> +   };
> +
> +  

Re: [OpenWrt-Devel] Recommended settings ip6 DNS server / dnsmasq

2015-08-17 Thread Steven Barth
Hello Jean-Michel,

according to your Wiki-Entry stateful addressing does work,
no need to do anything with dnsmasq.

Quoting your ifconfig output

" addr inet6: 2a01:e35:87d8:::953/128 Scope:Global"

is clearly a stateful address (/128) and your host got the host-id
953 for stateful adressing. You should see the lease on the router
in the WebUi or under /tmp/hosts/odhcpd. There you can also see the
duid you need for adding the static lease.

At some point using the mac-address (option mac) should work here
as well but it might be broken currently. I will put it on my todo.

Nevertheless:

config host
option duid '0012345678900...'
option hostid 4

is what works already.



Cheers,

Steven
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Recommended settings ip6 DNS server / dnsmasq

2015-08-17 Thread Jean-Michel Pouré - GOOZE
Dear Steven,

Thanks for this kind response.

> " addr inet6: 2a01:e35:87d8:::953/128 Scope:Global"

OK, I cannot find the lease in Luci, but here is /tmp/hosts/odhcpd
# br-lan 0004901071a15f278795aa0dd83bde8b 49874f74 - 1439881026 953
128 2a01:e35:87d8:::953/128

Is my duid 0004901071a15f278795aa0dd83bde8b?

" addr inet6: 2a01:e35:87d8:::953/128 Scope:Global"
> is clearly a stateful address (/128) and your host got the host-id
> 953 for stateful adressing. You should see the lease on the router
> in the WebUi or under /tmp/hosts/odhcpd. There you can also see the
> duid you need for adding the static lease.

OK. Good to know.

> At some point using the mac-address (option mac) should work here
> as well but it might be broken currently. I will put it on my todo.
> 
> Nevertheless:
> 
> config host
> option duid '0012345678900...'
> option hostid 4
> 
> is what works already.

I used:
config host 
option name 'sony-vaio'
option ip ''  
option mac '54:42:49:87:xx:xx'   
   
config host
option duid '0004901071a15f278795aa0dd83bde8b'
option hostid '3'


and it does not work. The assigned address is still
2a01:e35:87d8:::953

Kind regards,Jean-Michel

smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Setting password on serial console + disabling linux single user mode

2015-08-17 Thread Jean-Michel Pouré - GOOZE
Dear all,

What is the current way to ask for root password when connecting to
serial console:

/etc/inittab
::askconsole:/bin/ash --login

is there any way to ask for a password?

Also, what are the steps to disable single user mode booting?

Kind regards,
Jean-Michel


smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Recommended settings ip6 DNS server / dnsmasq

2015-08-17 Thread Jean-Michel Pouré - GOOZE
Le lundi 17 août 2015 à 20:32 +0200, Steven Barth a écrit :
> config host
> option duid '0012345678900...'
> option hostid 4

Okay, I got it, it works using 8 digits:0008
Will add it to the HOWTO and try to make a special howto on ipv6 delegation 
sooner.
Kind regards,Jean-Michel

smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Setting password on serial console

2015-08-17 Thread Tobias Welz

Hello Jean-Michael,

With Barrier Breaker i use this way - I assume it's the same with Chaos Calmer.
Install the login shell and change the /etc/inittab:

::askconsole:/bin/login

Regards Tobias

Am 17.08.2015 um 21:11 schrieb Jean-Michel Pouré - GOOZE:

Dear all,

What is the current way to ask for root password when connecting to
serial console:

/etc/inittab
::askconsole:/bin/ash --login

is there any way to ask for a password?

Also, what are the steps to disable single user mode booting?

Kind regards,
Jean-Michel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [netifd] enable MULTICAST on GRE

2015-08-17 Thread Hans Dedecker
On Mon, Aug 17, 2015 at 4:40 PM, Nick Podolak 
wrote:

>
> On Sat, Aug 15, 2015 at 3:25 AM, Hans Dedecker  wrote:
>
>> It would be better to make this a device setting like promiscuous
>>> mode,macaddr, etc ... so it can be configured via UCI for every device and
>>> thus not only restricted for GRE
>>>
>>
>> Hans
>>
>
> You make an excellent point and I agree, but I'm unsure of some of the
> details.
>
> Is promisc mode controllable from UCI?  I didn't think it was but I can't
> tell from looking at these parts of netifd.
>
Promiscuous mode is configurable from UCI; see device.c as all dev_attrs
entries can be set via UCI

>
> Help me understand the extent of this implementation.  Looks like each of
> these would need modification.  Did i miss anything?
> device.c
>   static const struct blobmsg_policy dev_attrs[__DEV_ATTR_MAX] = {
>   device_merge_settings(struct device *dev, struct device_settings *n)
>   device_init_settings(struct device *dev, struct blob_attr **tb)
>   device_dump_status(struct blob_buf *b, struct device *dev)
> system-linux.c
>   system_if_get_settings(struct device *dev, struct device_settings *s)
>   system_if_apply_settings(struct device *dev, struct device_settings *s,
> unsigned int apply_mask)
>
> UCI is all passthrough, right? nothing there would have to change?
>
> Your analysis regarding UCI and the impacted functions is correct; the
promiscuous mode implementation can be used as guidance for the multicast
device support.

Hans

> -Nick
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2] AR71xx: Add Minibox V1.0 support

2015-08-17 Thread Stijn Segers
This patch adds Gainstrong Minibox V1.0 into trunk.

Don't have the device myself, so can't check on a possible
LED polarity issue, but I have built images and asked for testing
on the forum.

Signed-off by: Stijn Segers 
---
 target/linux/ar71xx/base-files/etc/diag.sh |  3 +
 .../ar71xx/base-files/etc/uci-defaults/02_network  |  1 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  6 ++
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  1 +
 target/linux/ar71xx/config-4.1 |  1 +
 .../ar71xx/files/arch/mips/ath79/mach-minibox-v1.c | 85 ++
 target/linux/ar71xx/generic/profiles/minibox-v1.mk | 17 +
 target/linux/ar71xx/image/Makefile |  9 +++
 .../799-MIPS-ath79-add-minibox-v1-support.patch| 39 ++
 9 files changed, 162 insertions(+)
 create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
 create mode 100644 target/linux/ar71xx/generic/profiles/minibox-v1.mk
 create mode 100644 
target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh
index 561c5da..8820609 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -216,6 +216,9 @@ get_status_led() {
smart-300)
status_led="nc-link:green:system"
;;
+   minibox-v1)
+   status_led="minibox-v1:green:system"
+   ;;
oolite)
status_led="oolite:red:system"
;;
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network 
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index 2893e62..5506e3f 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -417,6 +417,7 @@ dir-615-e4 |\
 hiwifi-hc6361 |\
 ja76pf |\
 mc-mac1200r|\
+minibox-v1 |\
 mynet-n600 |\
 oolite |\
 qihoo-c301 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 256bd10..13324c3 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -119,6 +119,9 @@ tplink_board_detect() {
"3C0001"*)
model="OOLITE"
;;
+   "3C0002"*)
+   model="MINIBOX_V1"
+   ;;
"070300"*)
model="TP-Link TL-WR703N"
;;
@@ -499,6 +502,9 @@ ar71xx_board_detect() {
*"MAC1200R")
name="mc-mac1200r"
;;
+   *"MiniBox V1.0")
+   name="minibox-v1"
+   ;;
*MR12)
name="mr12"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 76d8c5b..228b2df 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -313,6 +313,7 @@ platform_check_image() {
el-mini | \
gl-inet | \
mc-mac1200r | \
+   minibox-v1 |\
onion-omega | \
oolite | \
smart-300 | \
diff --git a/target/linux/ar71xx/config-4.1 b/target/linux/ar71xx/config-4.1
index 1e31a01..2ff4a66 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -78,6 +78,7 @@ CONFIG_ATH79_MACH_HORNET_UB=y
 CONFIG_ATH79_MACH_JA76PF=y
 CONFIG_ATH79_MACH_JWAP003=y
 CONFIG_ATH79_MACH_MC_MAC1200R=y
+CONFIG_ATH79_MACH_MINIBOX_V1=y
 CONFIG_ATH79_MACH_MR12=y
 CONFIG_ATH79_MACH_MR16=y
 CONFIG_ATH79_MACH_MR600=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c 
b/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
new file mode 100644
index 000..c9fbbe5
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
@@ -0,0 +1,85 @@
+/*
+ *  Minibox V1.0 board support
+ *
+ *
+ *  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 "common.h"
+#include "dev-eth.h"
+#include "dev-gpio-buttons.h"
+#include "dev-leds-gpio.h"
+#include "dev-m25p80.h"
+#include "dev-usb.h"
+#include "dev-wmac.h"
+#include "machtypes.h"
+
+#define MINIBOX_V1_GPIO_BTN_RESET  11
+
+#define MINIBOX_V1_GPIO_LED_SYSTEM 1
+
+#define MINIBOX_V1_KEYS_POLL_INTERVAL  20  /* msecs */
+#define MINIBOX_V1_KEYS_DEBOUNCE_INTERVAL (3 * MINIBOX_V1_KEYS_POLL_INTERVAL)
+
+static const char *MINIBOX_V1_part_probes[] = {
+   "tp-link",
+   NULL,
+};
+
+static struct flash_platform_data MINIBOX_V1_flash_data = {
+   .part_probes= MINIBOX_V1_part_probes,
+};
+
+static struct gpio_led MINIBOX_V1_leds_gpio[] __initdata = {
+   {
+   .name  

Re: [OpenWrt-Devel] Setting password on serial console

2015-08-17 Thread Jean-Michel Pouré - GOOZE
Le lundi 17 août 2015 à 21:31 +0200, Tobias Welz a écrit :
> With Barrier Breaker i use this way - I assume it's the same with 
> Chaos Calmer.
> Install the login shell and change the /etc/inittab:
> 
> ::askconsole:/bin/login

There is no /bin/login anymore in OpenWRT development branch. Do I need to 
install a package ?

smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Recommended settings ip6 DNS server / dnsmasq

2015-08-17 Thread Stefan Lippers-Hollmann
Hi

On 2015-08-17, Jean-Michel Pouré - GOOZE wrote:
> Dear Steven,
> 
> Thanks for this kind response.
> 
> > " addr inet6: 2a01:e35:87d8:::953/128 Scope:Global"
> 
> OK, I cannot find the lease in Luci, but here is /tmp/hosts/odhcpd

LuCI should show it on Status/ Overview, quite to the bottom under 
"DHCPv6 Leases".

> # br-lan 0004901071a15f278795aa0dd83bde8b 49874f74 - 1439881026 953
> 128 2a01:e35:87d8:::953/128
> 
> Is my duid 0004901071a15f278795aa0dd83bde8b?

Yes, but you need to restart odhcpd(IPv6) (and dnsmasq(IPv4) after 
changing /etc/config/dhcp, doing that clears /tmp/hosts/odhcpd as a 
side effect.

[...]
> > At some point using the mac-address (option mac) should work here
> > as well but it might be broken currently. I will put it on my todo.

This is basically a question I was planning to ask, right now (as in 
trunk r46589 on a TP-Link TL-WDR4300) it seems that specifying the
duid is necessary. 

For my personal situation (virtual machines (kvm) for testing differing 
stateless systems, I give each of the VM definitions a static MAC/ IPv4
mapping and DNS entry - but I can't guess the duid for different OS 
images in advance), it would be great if it were possible to omit the 
duid and use the MAC address exclusively.

[...]
> I used:
> config host 
> option name 'sony-vaio'
> option ip ''  
> option mac '54:42:49:87:xx:xx'   
>
> config host
> option duid '0004901071a15f278795aa0dd83bde8b'
> option hostid '3'

What works for me, is this

config host
option name 'foobar'
option mac 'BC:5F:F4:XX:XX:XX'
option ip '10.10.7.0'
option duid '0002ab119da6fe0c'
option hostid '100700'
option dns '1'

The dns option should be optional, but is very convenient for me; I make 
quite heavy use of local (forward- and reverse) local DNS entries for
physical and virtual systems.

> and it does not work. The assigned address is still
> 2a01:e35:87d8:::953

Most likely because you didn't restart odhcpd - or eventually because
you split it into two config sections (I'm not sure if that's valid).

Regards
Stefan Lippers-Hollmann


pgpIOYpwu1vkq.pgp
Description: Digitale Signatur von OpenPGP
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [libubox] ulog: check if /dev/kmsg is special file

2015-08-17 Thread Sergiy Kibrik
hi John,

> the patch is quite invasive. how about just using "r+"
>
> from the man page -->  "r+ Open for reading and writing.  The stream
> is positioned at the beginning of the file."
>
> could you try the following and not apply any other changes ?
>
>   John
>
> - if ((kmsg = fopen("/dev/kmsg", "w")) != NULL) {
> + if ((kmsg = fopen("/dev/kmsg", "r+")) != NULL) {

should we go on without check for character special flag then?

--
regards,
Sergey



signature.asc
Description: OpenPGP digital signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Recommended settings ip6 DNS server / dnsmasq

2015-08-17 Thread Jean-Michel Pouré - GOOZE
> Okay, I got it, it works using 8 digits:0008


I am still having difficulties setting IPv6 gateway using DHCP only.

If using SLAAC, routes will propagate very well, but I end-up with
several IPv6. I don't want any derived IPv6 from MAC.

The client IP is 2a01:e35:87d8::::.

The correct route is:
/sbin/route -A inet6 |grep -w "eth0"
2a01:e35:87d8::::/128 :: U256 0
 0 eth0
2a01:e35:87d8:::/64:: U100 0   
  0 eth0
fe80::/64  :: U256 0   
  3 eth0
::/0   fe80::ea94:f6ff::  UG   100 3   
  0 eth0
ff00::/8   :: U256 3   
  0 eth0

fe80::ea94:f6ff:: is the local OpenWRT gateway.


DNSMASQ does not know how to set this kind of route using DHCP only.

An alternative would be to use SLAAC for routes only, not to propagate
IPv6 addresses derived from MAC.

Any idea? Does dnsmasq know how to propagate routes using DHCP only?
This would be nice NOT to rely on SLAAC.

I will write a howto with these information, don't worry, just guide
me.

Kind regards,
Jean-Michel

smime.p7s
Description: S/MIME cryptographic signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] Added WIZnet WizFi630A Platform based on Ralink RT5350

2015-08-17 Thread Tobias Welz

From: Tobias Welz 


Signed-off-by: Tobias Welz 
---
 .../linux/ramips/base-files/etc/board.d/02_network |5 +
 target/linux/ramips/base-files/etc/diag.sh |3 +
 target/linux/ramips/base-files/lib/ramips.sh   |3 +
 .../ramips/base-files/lib/upgrade/platform.sh  |1 +
 target/linux/ramips/dts/WIZFI630A.dts  |  294 


 target/linux/ramips/image/Makefile |4 +-
 target/linux/ramips/rt305x/profiles/wizfi630a.mk   |   18 ++
 7 files changed, 327 insertions(+), 1 deletion(-)
 create mode 100644 target/linux/ramips/dts/WIZFI630A.dts
 create mode 100644 target/linux/ramips/rt305x/profiles/wizfi630a.mk

diff --git a/target/linux/ramips/base-files/etc/board.d/02_network 
b/target/linux/ramips/base-files/etc/board.d/02_network

index 6a2f042..cfd0b26 100755
--- a/target/linux/ramips/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/base-files/etc/board.d/02_network
@@ -217,6 +217,7 @@ ramips_setup_interfaces()
ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 6t"
ucidef_add_switch_vlan "switch0" "2" "5 6t"
;;
+   wizfi630a | \
y1s)
ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2"
ucidef_add_switch "switch0" "1" "1"
@@ -320,6 +321,10 @@ ramips_setup_macs()
wcr-150gn)
wan_mac=$(mtd_get_mac_binary factory 40)
;;
+   wizfi630a)
+   lan_mac=$(mtd_get_mac_binary factory 4)
+   wan_mac=$(mtd_get_mac_binary factory 40)
+   ;;
whr-1166d|\
whr-300hp2|\
whr-600d|\
diff --git a/target/linux/ramips/base-files/etc/diag.sh 
b/target/linux/ramips/base-files/etc/diag.sh

index a4911b0..54b84e5 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -143,6 +143,9 @@ get_status_led() {
whr-600d)
status_led="$board:orange:wifi"
;;
+   wizfi630a)
+   status_led="wizfi630a::run"
+   ;;
rt-n10-plus|\
tew-691gr|\
tew-692gr|\
diff --git a/target/linux/ramips/base-files/lib/ramips.sh 
b/target/linux/ramips/base-files/lib/ramips.sh

index 5cafd45..b6d1023 100755
--- a/target/linux/ramips/base-files/lib/ramips.sh
+++ b/target/linux/ramips/base-files/lib/ramips.sh
@@ -367,6 +367,9 @@ ramips_board_detect() {
*"WIZARD 8800")
name="wizard8800"
;;
+   *"WIZnet WizFi630A")
+   name="wizfi630a"
+   ;;
*"WL-330N")
name="wl-330n"
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh 
b/target/linux/ramips/base-files/lib/upgrade/platform.sh

index 53e7070..947a328 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -107,6 +107,7 @@ platform_check_image() {
whr-300hp2|\
whr-600d|\
whr-g300n|\
+   wizfi630a |\
wl-330n|\
wl-330n3g|\
wl-341v3|\
diff --git a/target/linux/ramips/dts/WIZFI630A.dts 
b/target/linux/ramips/dts/WIZFI630A.dts

new file mode 100644
index 000..0d44c71
--- /dev/null
+++ b/target/linux/ramips/dts/WIZFI630A.dts
@@ -0,0 +1,294 @@
+/dts-v1/;
+
+/include/ "rt5350.dtsi"
+
+/ {
+   compatible = "wizfi630a", "ralink,rt5350-soc";
+   model = "WIZnet WizFi630A";
+
+   chosen {
+   bootargs = "console=ttyS1,115200";
+   };
+
+   palmbus@1000 {
+   gpio1: gpio@660 {
+   status = "okay";
+   };
+
+   spi@b00 {
+   status = "okay";
+
+   m25p80@0 {
+   #address-cells = <1>;
+   #size-cells = <1>;
+   compatible = "w25q128";
+   reg = <0>;
+   linux,modalias = "m25p80", "w25q128";
+   spi-max-frequency = <1000>;
+
+   partition@0 {
+   label = "uboot";
+   reg = <0x0 0x3>;
+   read-only;
+   };
+
+   partition@3 {
+   label = "uboot-env";
+   reg = <0x3 0x1>;
+   read-only;
+   };
+
+   factory: partition@4 {
+   label = "factory";
+   reg = <0x4 0x1>;
+   read-only;
+   };
+
+   partition@5 {
+   labe

Re: [OpenWrt-Devel] [PATCH v2] AR71xx: Add Minibox V1.0 support

2015-08-17 Thread Karl Palsson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Personally I'd like to see Gainstrong mentioned _somewhere_ in the patch
itself.

> +--- a/arch/mips/ath79/machtypes.h
>  b/arch/mips/ath79/machtypes.h
> +@@ -74,6 +74,7 @@ enum ath79_mach_type {
> + ATH79_MACH_JA76PF2, /* jjPlus JA76PF2 */
> + ATH79_MACH_JWAP003, /* jjPlus JWAP003 */
> + ATH79_MACH_HORNET_UB,   /* ALFA Networks Hornet-UB */
> ++ATH79_MACH_MINIBOX_V1,  /* MINIBOX V1.0 */

Maybe here?  Otherwise that comment is pretty irrelevant...

> + ATH79_MACH_MR12,/* Cisco Meraki MR12 */
> + ATH79_MACH_MR16,/* Cisco Meraki MR16 */
> + ATH79_MACH_MR600V2, /* OpenMesh MR600v2 */




The ALLCAPS_PREFIX_ in the board file is... special? Have you seen that
anywhere else?


Stijn Segers  wrote:
> This patch adds Gainstrong Minibox V1.0 into trunk.
> 
> Don't have the device myself, so can't check on a possible
> LED polarity issue, but I have built images and asked for testing
> on the forum.
> 
> Signed-off by: Stijn Segers 
> ---
>  target/linux/ar71xx/base-files/etc/diag.sh |  3 +
>  .../ar71xx/base-files/etc/uci-defaults/02_network  |  1 +
>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |  6 ++
>  .../ar71xx/base-files/lib/upgrade/platform.sh  |  1 +
>  target/linux/ar71xx/config-4.1 |  1 +
>  .../ar71xx/files/arch/mips/ath79/mach-minibox-v1.c | 85 
> ++
>  target/linux/ar71xx/generic/profiles/minibox-v1.mk | 17 +
>  target/linux/ar71xx/image/Makefile |  9 +++
>  .../799-MIPS-ath79-add-minibox-v1-support.patch| 39 ++
>  9 files changed, 162 insertions(+)
>  create mode 100644 
> target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
>  create mode 100644 target/linux/ar71xx/generic/profiles/minibox-v1.mk
>  create mode 100644 
> target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch
> 
> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
> b/target/linux/ar71xx/base-files/etc/diag.sh
> index 561c5da..8820609 100644
> --- a/target/linux/ar71xx/base-files/etc/diag.sh
> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
> @@ -216,6 +216,9 @@ get_status_led() {
>   smart-300)
>   status_led="nc-link:green:system"
>   ;;
> + minibox-v1)
> + status_led="minibox-v1:green:system"
> + ;;
>   oolite)
>   status_led="oolite:red:system"
>   ;;
> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> index 2893e62..5506e3f 100755
> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
> @@ -417,6 +417,7 @@ dir-615-e4 |\
>  hiwifi-hc6361 |\
>  ja76pf |\
>  mc-mac1200r|\
> +minibox-v1 |\
>  mynet-n600 |\
>  oolite |\
>  qihoo-c301 |\
> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> index 256bd10..13324c3 100755
> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
> @@ -119,6 +119,9 @@ tplink_board_detect() {
>   "3C0001"*)
>   model="OOLITE"
>   ;;
> + "3C0002"*)
> + model="MINIBOX_V1"
> + ;;
>   "070300"*)
>   model="TP-Link TL-WR703N"
>   ;;
> @@ -499,6 +502,9 @@ ar71xx_board_detect() {
>   *"MAC1200R")
>   name="mc-mac1200r"
>   ;;
> + *"MiniBox V1.0")
> + name="minibox-v1"
> + ;;
>   *MR12)
>   name="mr12"
>   ;;
> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> index 76d8c5b..228b2df 100755
> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
> @@ -313,6 +313,7 @@ platform_check_image() {
>   el-mini | \
>   gl-inet | \
>   mc-mac1200r | \
> + minibox-v1 |\
>   onion-omega | \
>   oolite | \
>   smart-300 | \
> diff --git a/target/linux/ar71xx/config-4.1
> b/target/linux/ar71xx/config-4.1
> index 1e31a01..2ff4a66 100644
> --- a/target/linux/ar71xx/config-4.1
> +++ b/target/linux/ar71xx/config-4.1
> @@ -78,6 +78,7 @@ CONFIG_ATH79_MACH_HORNET_UB=y
>  CONFIG_ATH79_MACH_JA76PF=y
>  CONFIG_ATH79_MACH_JWAP003=y
>  CONFIG_ATH79_MACH_MC_MAC1200R=y
> +CONFIG_ATH79_MACH_MINIBOX_V1=y
>  CONFIG_ATH79_MACH_MR12=y
>  CONFIG_ATH79_MACH_MR16=y
>  CONFIG_ATH79_MACH_MR600=y
> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
> b/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
> new file mode 100644
> index 000..c9fbbe5
> --- /dev/null
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
> @@ -0,0 +1,85 @@
> +/*
> +

Re: [OpenWrt-Devel] Linux kernel config options handling in OpenWRT

2015-08-17 Thread Hauke Mehrtens
On 08/17/2015 10:43 AM, Alexey Brodkin wrote:
> Hello,
> 
> I'm playing with OpenWRT for a new platform and have a question on
> how OpenWRT handles KCONFIG kernel options.
> 
> For example I select "KernelPackage/crypto-core" in OpenWRT's menuconfig
> then KCONFIG is populated with:
> -->8
> CONFIG_CRYPTO=y
> CONFIG_CRYPTO_HW=y
> CONFIG_CRYPTO_BLKCIPHER
> CONFIG_CRYPTO_ALGAPI
> -->8
> 
> From what I may see from grepping through OpenWRT that KCONFIG value
> is only used to determine if those options are enabled in kernel configuration
> but not for force selection of options in kernel.

They are mainly used for selecting the config options in the kernel. I
do not know how exactly it is done.

> In other words if I want to get crypto core built I need to make sure first
> that in my say "target/linux/board/config-4.1" options mentioned above are
> enabled. Is that observation correct?

no

> I'm asking because my initial assumption was I need to provide a minimal
> kernel configuration in "target/linux/board/config-4.1" and then on
> selection of kmods in OpenWRT's menuconfig missing config options
> will be automatically added in kernel config.

Your initial assumption was correct. You should provide a minimal
"target/linux/board/config-4.1" which selects all kernel options which
will be compiled into the main kernel image, it should not contain any
option selected as a module, everything you want to build as a module
should be defined in a OpenWrt kernel package and they it can be
selected optional.

> But apparently no options are auto-enabled because I'm seeing that kind
> of build failure if CONFIG_CRYPTO_BLKCIPHER is not explicitly set in my
> kernel config:
> -->8
> NOTICE: module 'xxx/openwrt/build_dir/target-yyy/linux-zzz/linux
> -4.1.3/crypto/crypto_algapi.ko' is built-in.
> ERROR: module 'xxx/openwrt/build_dir/target-yyy/linux-zzz/linux
> -4.1.3/crypto/crypto_blkcipher.ko' is missing.
> modules/crypto.mk:30: recipe for target 'xxx/openwrt/bin/axs10x
> -uClibc/packages/base/kmod-crypto-core_4.1.3-1_axs10x.ipk' failed
> make[3]: *** [xxx/openwrt/bin/axs10x
> -uClibc/packages/base/kmod-crypto-core_4.1.3-1_axs10x.ipk] Error 1
> -->8

The kmod-crypto-core from KernelPackage/crypto-core should select the
CONFIG_CRYPTO_BLKCIPHER option.

Hauke
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2 00/25] ramips: massive code cleanups

2015-08-17 Thread 郭传鈜
Hi!
I just wonder why you chose to use the board name in LED
names?Sometimes we can use the same dts file for different boards.For
example, in ar71xx wr841nd-v3 wr941nd-v2 and wr941nd-v3 shares
mach-tl-wr941nd-v2.c(I haven't found such examples in ramips target.)I
think the LED name will be a bit strange in this situation:-(

2015-08-17 19:24 GMT+08:00 Piotr Dymacz :
> 2015-08-17 8:28 GMT+02:00 John Crispin :
>> Hi,
>>
>> just merged the whole lot. thanks a lot. what do you want to do next
>> lantiq or ar71xx ? :) personally i would prefer ar71xx ;)
>> [...]
>
> Hello John,
>
> It seems that there are some people who don't like the changes (see
> below), but they don't have enough courage to use their real name and
> post their comments on the list.
>
> I will back with answers for your and Michael Heimpold (I'm sorry, I
> didn't spot your e-mail before!) questions in few days. Now I'm really
> busy with other things.
>
> Cheers,
> Piotr Dymacz
>
> ---
>
> 2015-08-17 13:05 GMT+02:00 West Fuck :
>> https://dev.openwrt.org/changeset/46617
>>
>> of all the bugs on related system you have choosen to change board and led
>> names? why do you stick your nose into something that is not relevant? is it
>> because your'e stupid fucking excuse for human being? you couldn't even make
>> your uboot work without errors on some boards so why don't you stick to your
>> own crap instead of acting like your're doing something
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] ramips: add support for Planex DB-WRT01

2015-08-17 Thread Tochiro SrcHack
Sorry,

Re-send After correcting the patch.


2015-08-18 3:13 GMT+09:00 Piotr Dymacz :

> Hello,
>
> Please, see my comments inline.
>
> 2015-08-17 19:20 GMT+02:00 YuheiOKAWA :
> >  This patch add support for Planex DB-WRT01. DANBOARD route on
> >  the MT7620A SoC with two Ethernet port and a 802.11n 2.4 GHz radio.
> >  DANBOARD is Cartoon character.
> >
> > Signed-off-by: YuheiOKAWA 
> > ---
> >  target/linux/ramips/base-files/etc/board.d/01_leds |  3 +
> >  .../linux/ramips/base-files/etc/board.d/02_network |  1 +
> >  target/linux/ramips/base-files/etc/diag.sh |  1 +
> >  target/linux/ramips/base-files/lib/ramips.sh   |  3 +
> >  .../ramips/base-files/lib/upgrade/platform.sh  |  1 +
> >  target/linux/ramips/dts/DB-WRT01.dts   | 99
> ++
> >  target/linux/ramips/image/Makefile |  2 +
> >  7 files changed, 110 insertions(+)
> >  create mode 100644 target/linux/ramips/dts/DB-WRT01.dts
> >
> > diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds
> b/target/linux/ramips/base-files/etc/board.d/01_leds
> > index 71cf3ac..a9959e3 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/01_leds
> > +++ b/target/linux/ramips/base-files/etc/board.d/01_leds
> > @@ -87,6 +87,9 @@ d105)
> > ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
> > set_usb_led "$board:green:usb"
> > ;;
> > +db-wrt01)
> > +   ucidef_set_led_default "power" "power" "$board:orange:power" "1"
> > +   ;;
> >  dcs-930l-b1)
> > ucidef_set_led_default "power" "POWER" "$board:red:power" "1"
> > ucidef_set_led_netdev "wifi" "WiFi" "$board:blue:wps"
> > diff --git a/target/linux/ramips/base-files/etc/board.d/02_network
> b/target/linux/ramips/base-files/etc/board.d/02_network
> > index 6a2f042..02cd682 100755
> > --- a/target/linux/ramips/base-files/etc/board.d/02_network
> > +++ b/target/linux/ramips/base-files/etc/board.d/02_network
> > @@ -61,6 +61,7 @@ ramips_setup_interfaces()
> > ;;
> > 3g-6200n|\
> > ai-br100|\
> > +   db-wrt01|\
> > dir-300-b7|\
> > dir-320-b1|\
> > dir-610-a1|\
> > diff --git a/target/linux/ramips/base-files/etc/diag.sh
> b/target/linux/ramips/base-files/etc/diag.sh
> > index a4911b0..f886b5d 100644
> > --- a/target/linux/ramips/base-files/etc/diag.sh
> > +++ b/target/linux/ramips/base-files/etc/diag.sh
> > @@ -94,6 +94,7 @@ get_status_led() {
> > y1s)
> > status_led="$board:blue:power"
> > ;;
> > +   db-wrt01|\
> > esr-9753)
> > status_led="$board:orange:power"
> > ;;
> > diff --git a/target/linux/ramips/base-files/lib/ramips.sh
> b/target/linux/ramips/base-files/lib/ramips.sh
> > index 5cafd45..5b6808e 100755
> > --- a/target/linux/ramips/base-files/lib/ramips.sh
> > +++ b/target/linux/ramips/base-files/lib/ramips.sh
> > @@ -97,6 +97,9 @@ ramips_board_detect() {
> > *"DAP-1350")
> > name="dap-1350"
> > ;;
> > +   *"DB-WRT01")
> > +   name="db-wrt01"
> > +   ;;
> > *"DCS-930")
> > name="dcs-930"
> > ;;
> > diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> > index 53e7070..844ed5d 100755
> > --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
> > +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
> > @@ -36,6 +36,7 @@ platform_check_image() {
> > cf-wr800n|\
> > d105|\
> > dap-1350|\
> > +   db-wrt01|\
> > dcs-930|\
> > dcs-930l-b1|\
> > dir-300-b1|\
> > diff --git a/target/linux/ramips/dts/DB-WRT01.dts
> b/target/linux/ramips/dts/DB-WRT01.dts
> > new file mode 100644
> > index 000..a8953e9
> > --- /dev/null
> > +++ b/target/linux/ramips/dts/DB-WRT01.dts
> > @@ -0,0 +1,99 @@
> > +/dts-v1/;
> > +
> > +/include/ "mt7620a.dtsi"
> > +
> > +/ {
> > +   compatible = "ralink,mt7620a-soc";
> > +   model = "Planex DB-WRT01";
> > +
> > +   palmbus@1000 {
> > +   gpio1: gpio@638 {
> > +   status = "okay";
> > +   };
> > +
> > +   spi@b00 {
> > +   status = "okay";
> > +
> > +   m25p80@0 {
> > +   #address-cells = <1>;
> > +   #size-cells = <1>;
> > +   compatible = "en25q64";
> > +   reg = <0 0>;
> > +   linux,modalias = "m25p80", "mx25l6405d";
> > +   spi-max-frequency = <1000>;
> > +
> > +   partition@0 {
> > +   label = "u-boot";
> > +   reg = <0x0 0x3>;
> > +   read-only;
> > + 

Re: [OpenWrt-Devel] [PATCH v2 00/25] ramips: massive code cleanups

2015-08-17 Thread Jonathan Bennett
Those sort of emails are always just a bit discouraging. Keep in mind that
they tend to come from people that are slightly autistic or have Aspergers.

>From the rest of us, though, thank you for your hard work.

--Jonathan Bennett

On Mon, Aug 17, 2015 at 6:24 AM Piotr Dymacz  wrote:

> 2015-08-17 8:28 GMT+02:00 John Crispin :
> > Hi,
> >
> > just merged the whole lot. thanks a lot. what do you want to do next
> > lantiq or ar71xx ? :) personally i would prefer ar71xx ;)
> > [...]
>
> Hello John,
>
> It seems that there are some people who don't like the changes (see
> below), but they don't have enough courage to use their real name and
> post their comments on the list.
>
> I will back with answers for your and Michael Heimpold (I'm sorry, I
> didn't spot your e-mail before!) questions in few days. Now I'm really
> busy with other things.
>
> Cheers,
> Piotr Dymacz
>
> ---
>
> 2015-08-17 13:05 GMT+02:00 West Fuck :
> > https://dev.openwrt.org/changeset/46617
> >
> > of all the bugs on related system you have choosen to change board and
> led
> > names? why do you stick your nose into something that is not relevant?
> is it
> > because your'e stupid fucking excuse for human being? you couldn't even
> make
> > your uboot work without errors on some boards so why don't you stick to
> your
> > own crap instead of acting like your're doing something
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] [libubox] ulog: check if /dev/kmsg is special file

2015-08-17 Thread John Crispin


On 17/08/2015 22:37, Sergiy Kibrik wrote:
> hi John,
> 
>> the patch is quite invasive. how about just using "r+"
>>
>> from the man page -->  "r+ Open for reading and writing.  The stream
>> is positioned at the beginning of the file."
>>
>> could you try the following and not apply any other changes ?
>>
>>  John
>>
>> -if ((kmsg = fopen("/dev/kmsg", "w")) != NULL) {
>> +if ((kmsg = fopen("/dev/kmsg", "r+")) != NULL) {
> 
> should we go on without check for character special flag then?
> 

well, if we use r+ i think the problem will not arise so we can skip the
detection




> --
> regards,
> Sergey
> 
> 
> 
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] lantiq DSL drivers / firmware info

2015-08-17 Thread John Crispin
Hi,

On 15/08/2015 23:38, Mathias Kresin wrote:
> Am 24.07.2015 um 01:20 schrieb Martin Blumenstingl:
>> On Fri, Jul 24, 2015 at 1:00 AM, Aleksander Wałęski
>>  wrote:
>>> Actually, it just dawned on me that they can be doing just that. In
>>> the bootloader. This is the only part of firmware we are not changing.
>>> If PCBs turn out to be identical we might want to check this.
>> That was my first guess, but I am using the open source u-boot version
>> on the BT Home Hub 5A (= Annex A device) and it still refuses to
>> connect to Annex B (at least back when I tried last, I switched to
>> VDSL like two months ago).
> 
> I can confirm that it is unrelated to the bootloader. I crossflashed my
> Annex A W8980v1 with the W9980B (Annex B) firmware. During crossflash,
> the bootloader is updated as well. Afterwards, I do get exactly the same
> error message as Andre:
> 
> xDSL Leave SHOWTIME!!
> DSL_CPE: Wrong combination of DSL PHY Firmware and hybrid type used!

this line above says it all ... here is a bit of tech background.

Annex-A is when you run dsl on an analogue phone line
Annex-B is when you run dsl on a digital phone line

For this to work the dsl has a so called hybrid. consider it like a
frequency filter. The hybrid dictates which firmware is required and
what line you can run it on. running an annex-a unit will only ever work
with an annex-a firmware on a POTS line. a annex-b hybrid will require a
annex-b firmware and an ISDN line.

John


> Please change one of it.
> nReturn=0 nData="E843 0003 0001 0009 "
> nReturn=0 nData="5048  0001 "
> nReturn=0 nData="1762  0001 "
> 
> I did not connected the device to an Annex B ADSL line yet, but I guess
> the result will be the same.
> 
> Furthermore, I replaced the content of mtd4@f200 (@f100 is the device
> mac address stored) and mtd5 with a bunch of 0x11, to test for a magic
> value, that is read from there. U-boot replaces the content of mtd5 with
> the ddr params right after reboot and neither the error message changes
> if a W9980B firmware is booted, nor an error message appears if a W9980
> firmware is booted. The content of mtd6 seams to be unrelated to me,
> since it contains the ath calibration data.
> 
> I share Daniels guess, that there could be a resistor, which locks the
> VRX208 to Annex A/Annex B ADSL mode. As already mentioned, it's
> unrelated to VDSL. My Annex B VDSL line works with the W9980B (and
> properly W9980) firmware out of the box.
> 
>> If you can figure out where the boot_sel pins are (similar to [0] or
>> [1]) to get it into CFG04 mode (= boot via UART) then I can add a
>> patch for Daniel Schwierzeck's open source lantiq u-boot. But be
>> aware: you need to pull some of them HIGH (= 3.3V, *NOT* 5V) - you
>> could damage your device by pulling the wrong pin HIGH.
> 
> I found the location of the boot_sel pin and have updated the W8980v1
> wiki page.
> 
> Mathias
> ___
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH v2] AR71xx: Add Minibox V1.0 support

2015-08-17 Thread John Crispin


On 17/08/2015 23:25, Karl Palsson wrote:
> Personally I'd like to see Gainstrong mentioned _somewhere_ in the patch
> itself.
> 
>> +--- a/arch/mips/ath79/machtypes.h
>>  b/arch/mips/ath79/machtypes.h
>> +@@ -74,6 +74,7 @@ enum ath79_mach_type {
>> +ATH79_MACH_JA76PF2, /* jjPlus JA76PF2 */
>> +ATH79_MACH_JWAP003, /* jjPlus JWAP003 */
>> +ATH79_MACH_HORNET_UB,   /* ALFA Networks Hornet-UB */
>> ++   ATH79_MACH_MINIBOX_V1,  /* MINIBOX V1.0 */
> 

Its a comment, but feel free to send a patch to modify the comment.

> Maybe here?  Otherwise that comment is pretty irrelevant...
> 
>> +ATH79_MACH_MR12,/* Cisco Meraki MR12 */
>> +ATH79_MACH_MR16,/* Cisco Meraki MR16 */
>> +ATH79_MACH_MR600V2, /* OpenMesh MR600v2 */
> 
> 
> 
> 
> The ALLCAPS_PREFIX_ in the board file is... special? Have you seen that
> anywhere else?

-EPARSE





> 
> 
> Stijn Segers  wrote:
>> This patch adds Gainstrong Minibox V1.0 into trunk.
> 
>> Don't have the device myself, so can't check on a possible
>> LED polarity issue, but I have built images and asked for testing
>> on the forum.
> 
>> Signed-off by: Stijn Segers 
>> ---
>>  target/linux/ar71xx/base-files/etc/diag.sh |  3 +
>>  .../ar71xx/base-files/etc/uci-defaults/02_network  |  1 +
>>  target/linux/ar71xx/base-files/lib/ar71xx.sh   |  6 ++
>>  .../ar71xx/base-files/lib/upgrade/platform.sh  |  1 +
>>  target/linux/ar71xx/config-4.1 |  1 +
>>  .../ar71xx/files/arch/mips/ath79/mach-minibox-v1.c | 85 
>> ++
>>  target/linux/ar71xx/generic/profiles/minibox-v1.mk | 17 +
>>  target/linux/ar71xx/image/Makefile |  9 +++
>>  .../799-MIPS-ath79-add-minibox-v1-support.patch| 39 ++
>>  9 files changed, 162 insertions(+)
>>  create mode 100644 
>> target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
>>  create mode 100644 target/linux/ar71xx/generic/profiles/minibox-v1.mk
>>  create mode 100644 
>> target/linux/ar71xx/patches-4.1/799-MIPS-ath79-add-minibox-v1-support.patch
> 
>> diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
>> b/target/linux/ar71xx/base-files/etc/diag.sh
>> index 561c5da..8820609 100644
>> --- a/target/linux/ar71xx/base-files/etc/diag.sh
>> +++ b/target/linux/ar71xx/base-files/etc/diag.sh
>> @@ -216,6 +216,9 @@ get_status_led() {
>>  smart-300)
>>  status_led="nc-link:green:system"
>>  ;;
>> +minibox-v1)
>> +status_led="minibox-v1:green:system"
>> +;;
>>  oolite)
>>  status_led="oolite:red:system"
>>  ;;
>> diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
>> b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
>> index 2893e62..5506e3f 100755
>> --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
>> +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
>> @@ -417,6 +417,7 @@ dir-615-e4 |\
>>  hiwifi-hc6361 |\
>>  ja76pf |\
>>  mc-mac1200r|\
>> +minibox-v1 |\
>>  mynet-n600 |\
>>  oolite |\
>>  qihoo-c301 |\
>> diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> b/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> index 256bd10..13324c3 100755
>> --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
>> @@ -119,6 +119,9 @@ tplink_board_detect() {
>>  "3C0001"*)
>>  model="OOLITE"
>>  ;;
>> +"3C0002"*)
>> +model="MINIBOX_V1"
>> +;;
>>  "070300"*)
>>  model="TP-Link TL-WR703N"
>>  ;;
>> @@ -499,6 +502,9 @@ ar71xx_board_detect() {
>>  *"MAC1200R")
>>  name="mc-mac1200r"
>>  ;;
>> +*"MiniBox V1.0")
>> +name="minibox-v1"
>> +;;
>>  *MR12)
>>  name="mr12"
>>  ;;
>> diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> index 76d8c5b..228b2df 100755
>> --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
>> @@ -313,6 +313,7 @@ platform_check_image() {
>>  el-mini | \
>>  gl-inet | \
>>  mc-mac1200r | \
>> +minibox-v1 |\
>>  onion-omega | \
>>  oolite | \
>>  smart-300 | \
>> diff --git a/target/linux/ar71xx/config-4.1
>> b/target/linux/ar71xx/config-4.1
>> index 1e31a01..2ff4a66 100644
>> --- a/target/linux/ar71xx/config-4.1
>> +++ b/target/linux/ar71xx/config-4.1
>> @@ -78,6 +78,7 @@ CONFIG_ATH79_MACH_HORNET_UB=y
>>  CONFIG_ATH79_MACH_JA76PF=y
>>  CONFIG_ATH79_MACH_JWAP003=y
>>  CONFIG_ATH79_MACH_MC_MAC1200R=y
>> +CONFIG_ATH79_MACH_MINIBOX_V1=y
>>  CONFIG_ATH79_MACH_MR12=y
>>  CONFIG_ATH79_MACH_MR16=y
>>  CONFIG_ATH79_MACH_MR600=y
>> diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-minibox-v1.c
>> b/target/linux/ar71xx/files/arch/mips/at

[OpenWrt-Devel] [PATCH v2] [libubox] ulog: avoid accidental /dev/kmsg creation

2015-08-17 Thread Sergiy Kibrik
Race is possible in ulog_kmsg(): if no /dev/kmsg exists
(e.g. while /dev gets re-mounted) regular file created instead.
>From this point system goes without kernel logger:
special character file can't be created anymore, all clients keep
overwriting single message in regular file.

To avoid this we open file in "r+" mode which doesn't create
file if it's not found.

Signed-off-by: Sergiy Kibrik 
Cc: John Crispin 
---
 ulog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ulog.c b/ulog.c
index 776a0c4..80b67ac 100644
--- a/ulog.c
+++ b/ulog.c
@@ -90,7 +90,7 @@ static void ulog_kmsg(int priority, const char *fmt, va_list 
ap)
 {
FILE *kmsg;
 
-   if ((kmsg = fopen("/dev/kmsg", "w")) != NULL) {
+   if ((kmsg = fopen("/dev/kmsg", "r+")) != NULL) {
fprintf(kmsg, "<%u>", priority);
 
if (_ulog_ident)
-- 
1.9.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel