Re: [OpenWrt-Devel] [PATCH 1/6] hostapd: update to version 2.8

2019-05-04 Thread Stefan Lippers-Hollmann
Hi

Successfully build-tested on:
- ath79
- ipq806x
- lantiq

Succeffully runtime tested on:
- ipq806x

On 2019-05-04, Hauke Mehrtens wrote:
> This also syncs the configuration files with the default configuration
> files, but no extra options are activated or deactivated.
>
> The mesh patches were partially merged into hostapd 2.8, the remaining
> patches were extracted from patchwork and are now applied by OpenWrt.
> The patches still have open questions which are not fixed by the author.
> They were taken from this page:
> https://patchwork.ozlabs.org/project/hostap/list/?series=62725=*
>
> Signed-off-by: Hauke Mehrtens 
Tested-by: Stefan Lippers-Hollmann 

[...]
> --- a/package/network/services/hostapd/Makefile
> +++ b/package/network/services/hostapd/Makefile
> @@ -11,9 +11,9 @@ PKG_RELEASE:=6
>
>  PKG_SOURCE_URL:=http://w1.fi/hostap.git
>  PKG_SOURCE_PROTO:=git
> -PKG_SOURCE_DATE:=2018-12-02
[...]
> +PKG_SOURCE_DATE:=2.8
[...]

The version number goes backwards here, I'd suggest sticking to the
date here (2019-04-21) otherwise opkg would like to install the older
snapshot again:

# opkg update
[...]
# opkg list-upgradable
hostapd-utils - 2.8-63962824-6 - 2018-12-02-c2c6c01b-6
wpad-openssl - 2.8-63962824-6 - 2018-12-02-c2c6c01b-6
wpa-cli - 2.8-63962824-6 - 2018-12-02-c2c6c01b-6
hostapd-common - 2.8-63962824-6 - 2018-12-02-c2c6c01b-6

You might also want to reset PKG_RELEASE to 1:

--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,11 +7,11 @@
 include $(TOPDIR)/rules.mk

 PKG_NAME:=hostapd
-PKG_RELEASE:=6
+PKG_RELEASE:=1

 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2.8
+PKG_SOURCE_DATE:=2019-04-21
 PKG_SOURCE_VERSION:=63962824309bb428e5f73d9caae08fcb949fbe36
 
PKG_MIRROR_HASH:=c3d789b822428c92bd47b3c85d9dc36cced38f7affe885cc2bb15e54248a4566


--
Regards
Stefan Lippers-Hollmann

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


[OpenWrt-Devel] [PATCH v2] procd: detect lxc container and behave accordingly

2019-05-04 Thread Paul Spooren
meaning to not mount some specific parts witch cause trouble.

The patch is based on previous work of @mikma to combine OpenWrt with
lxd[0]. This patch however adds a detection copied from *virt-what* to
check /proc/1/environment for the string "container".

Thanks to @dangowrt for the cleanup.

[0]: 
https://github.com/containercraft/openwrt-lxd/blob/master/patches/procd-openwrt-18.06/001_lxd_no_mounts.patch

Signed-off-by: Paul Spooren 
---
 container.h | 22 ++
 initd/early.c   | 20 
 initd/zram.c| 11 +++
 plug/coldplug.c | 14 +-
 4 files changed, 50 insertions(+), 17 deletions(-)
 create mode 100644 container.h

diff --git a/container.h b/container.h
new file mode 100644
index 000..c9b5e46
--- /dev/null
+++ b/container.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2019 Paul Spooren 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __CONTAINER_H
+#define __CONTAINER_H
+#include 
+
+static inline unsigned short int is_container() {
+   return !!getenv("container");
+}
+
+#endif
diff --git a/initd/early.c b/initd/early.c
index 2e15112..7b281b2 100644
--- a/initd/early.c
+++ b/initd/early.c
@@ -25,6 +25,7 @@
 #include "../utils/utils.h"
 #include "init.h"
 #include "../libc-compat.h"
+#include "../container.h"
 
 static void
 early_dev(void)
@@ -56,14 +57,17 @@ early_mounts(void)
 {
unsigned int oldumask = umask(0);
 
-   mount("proc", "/proc", "proc", MS_NOATIME | MS_NODEV | MS_NOEXEC | 
MS_NOSUID, 0);
-   mount("sysfs", "/sys", "sysfs", MS_NOATIME | MS_NODEV | MS_NOEXEC | 
MS_NOSUID, 0);
-   mount("cgroup", "/sys/fs/cgroup", "cgroup",  MS_NODEV | MS_NOEXEC | 
MS_NOSUID, 0);
-   mount("tmpfs", "/dev", "tmpfs", MS_NOATIME | MS_NOSUID, 
"mode=0755,size=512K");
-   ignore(symlink("/tmp/shm", "/dev/shm"));
-   mkdir("/dev/pts", 0755);
-   mount("devpts", "/dev/pts", "devpts", MS_NOATIME | MS_NOEXEC | 
MS_NOSUID, "mode=600");
-   early_dev();
+   if (!is_container()) {
+   mount("proc", "/proc", "proc", MS_NOATIME | MS_NODEV | 
MS_NOEXEC | MS_NOSUID, 0);
+   mount("sysfs", "/sys", "sysfs", MS_NOATIME | MS_NODEV | 
MS_NOEXEC | MS_NOSUID, 0);
+   mount("cgroup", "/sys/fs/cgroup", "cgroup",  MS_NODEV | 
MS_NOEXEC | MS_NOSUID, 0);
+   mount("tmpfs", "/dev", "tmpfs", MS_NOATIME | MS_NOSUID, 
"mode=0755,size=512K");
+   ignore(symlink("/tmp/shm", "/dev/shm"));
+   mkdir("/dev/pts", 0755);
+   mount("devpts", "/dev/pts", "devpts", MS_NOATIME | MS_NOEXEC | 
MS_NOSUID, "mode=600");
+
+   early_dev();
+   }
 
early_console("/dev/console");
if (mount_zram_on_tmp()) {
diff --git a/initd/zram.c b/initd/zram.c
index b41bfd9..487d3d6 100644
--- a/initd/zram.c
+++ b/initd/zram.c
@@ -12,6 +12,7 @@
 #include 
 
 #include "../log.h"
+#include "../container.h"
 
 #include "init.h"
 
@@ -116,10 +117,12 @@ mount_zram_on_tmp(void)
waitpid(pid, NULL, 0);
}
 
-   ret = mount("/dev/zram0", "/tmp", "ext4", MS_NOSUID | MS_NODEV | 
MS_NOATIME, "errors=continue,noquota");
-   if (ret < 0) {
-   ERROR("Can't mount /dev/zram0 on /tmp: %m\n");
-   return errno;
+   if (!is_container()) {
+   ret = mount("/dev/zram0", "/tmp", "ext4", MS_NOSUID | MS_NODEV 
| MS_NOATIME, "errors=continue,noquota");
+   if (ret < 0) {
+   ERROR("Can't mount /dev/zram0 on /tmp: %m\n");
+   return errno;
+   }
}
 
LOG("Using up to %ld kB of RAM as ZRAM storage on /mnt\n", zramsize);
diff --git a/plug/coldplug.c b/plug/coldplug.c
index c6a89c3..12df421 100644
--- a/plug/coldplug.c
+++ b/plug/coldplug.c
@@ -22,6 +22,7 @@
 #include "../libc-compat.h"
 
 #include "hotplug.h"
+#include "../container.h"
 
 static struct uloop_process udevtrigger;
 
@@ -43,13 +44,16 @@ void procd_coldplug(void)
char *argv[] = { "udevtrigger", NULL };
unsigned int oldumask = umask(0);
 
-   umount2("/dev/pts", MNT_DETACH);
-   umount2("/dev/", MNT_DETACH);
-   mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, "mode=0755,size=512K");
+   if (!is_container()) {
+   umount2("/dev/pts", MNT_DETACH);
+   umount2("/dev/", MNT_DETACH);
+   mount("tmpfs", "/dev", "tmpfs", MS_NOSUID, 
"mode=0755,size=512K");
+   mkdir("/dev/pts", 0755);
+   mount("devpts", "/dev/pts", "devpts", MS_NOEXEC | MS_NOSUID, 0);
+   }
+

[OpenWrt-Devel] RFC: add metadata to buildroot

2019-05-04 Thread Paul Spooren
Hi all,

from my point of view the current OpenWrt device documentation lacks
some unity, meaning the table of hardware is partly incomplete or
inconsistent. Also documentations are often rewritten with different
precision and "tongue".

To unify things I created a *PoC*[0], mostly based on the official
LineageOS Wiki[1], as they have a similar situation regarding devices.

The idea is to define templates describing common information and fill
them with device metadata.

The *PoC* above is based on the following metadata here[2]. Most parts
of the metadata are scraped from the current ToH[3], however some small
pieces are added and later rendered in something useful:

    tftp_image: ArcherC5v1_tp_recovery.bin
    tftp_ip: 192.168.0.66

Result in a small text to explain how to use the TFTP recovery.

    switch_ports:
      0: ETH1
      1: WAN
      2: LAN1
      3: LAN2
      4: LAN3
      5: LAN4
      6: ETH0

Creates a table with the switch port messing.

Same could be done with the flash layout, LEDs, etc.

All these information are (hopefully) available to the developer adding
a new device, therefore easy to supply such a `yaml` metadata file as
well. Often these information are (re-formulated) in commit messages
anyway[4]. Meaning, somewhere in the buildroot could be a store of
`yaml` files, which could even be reused for building itself.

A second repository like openwrt-device.git[5] could be added to render
the wiki pages and organize the templates.

I'd be happy to hear your opinions.

Best,
Paul

PS: I'm afraid I don't know the mail address of tmomas...

[0]:
https://aparcar.github.io/openwrt-devices/devices/tp-link_archer_c5_ac1200_v1/
[1]: http://wiki.lineageos.org/devices/
[2]:
https://github.com/aparcar/openwrt-devices/blob/master/_data/devices/tp-link_archer_c5_ac1200_v1.yml
[3]: https://openwrt.org/toh/hwdata/tp-link/tp-link_archer_c5_ac1200_v1
[4]:
https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=43e8c37cb4da64a12a3cb88a84b19db7f2fc640c
[5]: https://github.com/aparcar/openwrt-devices



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


[OpenWrt-Devel] [PATCH 6/6] hostapd: Remove ROBO switch support

2019-05-04 Thread Hauke Mehrtens
The driver was removed from OpenWrt a long time ago.

Signed-off-by: Hauke Mehrtens 
---
 package/network/services/hostapd/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/package/network/services/hostapd/Makefile 
b/package/network/services/hostapd/Makefile
index 5f0e548742..6e760babb2 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -129,8 +129,6 @@ ifneq ($(LOCAL_TYPE),hostapd)
   ifdef CONFIG_WPA_RFKILL_SUPPORT
 DRIVER_MAKEOPTS += NEED_RFKILL=y
   endif
-  DRIVER_MAKEOPTS += \
-   CONFIG_DRIVER_ROBOSWITCH=$(CONFIG_PACKAGE_kmod-switch)
 endif
 
 ifdef CONFIG_USE_GLIBC
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH 3/6] hostapd: use config option CONFIG_NO_LINUX_PACKET_SOCKET_WAR

2019-05-04 Thread Hauke Mehrtens
Instead of patching the workaround away, just use the config option.

Signed-off-by: Hauke Mehrtens 
---
 .../hostapd/files/wpa_supplicant-basic.config|  2 +-
 .../hostapd/files/wpa_supplicant-full.config |  2 +-
 .../hostapd/files/wpa_supplicant-mini.config |  2 +-
 .../services/hostapd/files/wpa_supplicant-p2p.config |  2 +-
 .../120-disable_bridge_packet_workaround.patch   | 12 
 5 files changed, 4 insertions(+), 16 deletions(-)
 delete mode 100644 
package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch

diff --git a/package/network/services/hostapd/files/wpa_supplicant-basic.config 
b/package/network/services/hostapd/files/wpa_supplicant-basic.config
index c93cf783a3..e88d6c4935 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-basic.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-basic.config
@@ -295,7 +295,7 @@ CONFIG_BACKEND=file
 # in a bridge for EAPOL frames. This should be uncommented only if the kernel
 # is known to not have the regression issue in packet socket behavior with
 # bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
-#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
+CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
 
 # IEEE 802.11w (management frame protection), also known as PMF
 # Driver support is also needed for IEEE 802.11w.
diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config 
b/package/network/services/hostapd/files/wpa_supplicant-full.config
index 10b4d15ea2..61164bfe9a 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-full.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-full.config
@@ -295,7 +295,7 @@ CONFIG_BACKEND=file
 # in a bridge for EAPOL frames. This should be uncommented only if the kernel
 # is known to not have the regression issue in packet socket behavior with
 # bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
-#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
+CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
 
 # IEEE 802.11w (management frame protection), also known as PMF
 # Driver support is also needed for IEEE 802.11w.
diff --git a/package/network/services/hostapd/files/wpa_supplicant-mini.config 
b/package/network/services/hostapd/files/wpa_supplicant-mini.config
index 9ffcf7e2e4..fb7d42b940 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-mini.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-mini.config
@@ -295,7 +295,7 @@ CONFIG_BACKEND=file
 # in a bridge for EAPOL frames. This should be uncommented only if the kernel
 # is known to not have the regression issue in packet socket behavior with
 # bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
-#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
+CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
 
 # IEEE 802.11w (management frame protection), also known as PMF
 # Driver support is also needed for IEEE 802.11w.
diff --git a/package/network/services/hostapd/files/wpa_supplicant-p2p.config 
b/package/network/services/hostapd/files/wpa_supplicant-p2p.config
index e2eb57bb38..1786d1ac64 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-p2p.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-p2p.config
@@ -295,7 +295,7 @@ CONFIG_BACKEND=file
 # in a bridge for EAPOL frames. This should be uncommented only if the kernel
 # is known to not have the regression issue in packet socket behavior with
 # bridge interfaces (commit 'bridge: respect RFC2863 operational state')').
-#CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
+CONFIG_NO_LINUX_PACKET_SOCKET_WAR=y
 
 # IEEE 802.11w (management frame protection), also known as PMF
 # Driver support is also needed for IEEE 802.11w.
diff --git 
a/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch
 
b/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch
deleted file mode 100644
index 0900db..00
--- 
a/package/network/services/hostapd/patches/120-disable_bridge_packet_workaround.patch
+++ /dev/null
@@ -1,12 +0,0 @@
 a/src/l2_packet/l2_packet_linux.c
-+++ b/src/l2_packet/l2_packet_linux.c
-@@ -360,8 +360,7 @@ struct l2_packet_data * l2_packet_init_b
- 
-   l2 = l2_packet_init(br_ifname, own_addr, protocol, rx_callback,
-   rx_callback_ctx, l2_hdr);
--  if (!l2)
--  return NULL;
-+  return l2;
- 
- #ifndef CONFIG_NO_LINUX_PACKET_SOCKET_WAR
-   /*
-- 
2.20.1


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


[OpenWrt-Devel] [PATCH 2/6] hostapd: backport some Fixes from upstream hostapd

2019-05-04 Thread Hauke Mehrtens
These two patches are fixing some problems which are fixed in hostapd
master, but not in version 2.8.

Signed-off-by: Hauke Mehrtens 
---
 ...-in-storing-of-external_auth-SSID-BS.patch | 82 +++
 ...-Fix-ENGINE-support-with-OpenSSL-1.1.patch | 39 +
 2 files changed, 121 insertions(+)
 create mode 100644 
package/network/services/hostapd/patches/040-Fix-a-regression-in-storing-of-external_auth-SSID-BS.patch
 create mode 100644 
package/network/services/hostapd/patches/041-Fix-ENGINE-support-with-OpenSSL-1.1.patch

diff --git 
a/package/network/services/hostapd/patches/040-Fix-a-regression-in-storing-of-external_auth-SSID-BS.patch
 
b/package/network/services/hostapd/patches/040-Fix-a-regression-in-storing-of-external_auth-SSID-BS.patch
new file mode 100644
index 00..8b29b08160
--- /dev/null
+++ 
b/package/network/services/hostapd/patches/040-Fix-a-regression-in-storing-of-external_auth-SSID-BS.patch
@@ -0,0 +1,82 @@
+From d42df8d6ce81d47aea8059c45e3db5c51897f7e8 Mon Sep 17 00:00:00 2001
+From: Jouni Malinen 
+Date: Sun, 28 Apr 2019 16:24:32 +0300
+Subject: [PATCH] Fix a regression in storing of external_auth SSID/BSSID
+
+An earlier change in drivers_ops API for struct external_auth broke the
+way SSID and BSSID for an external authentication request were stored.
+The implementation depended on the memory array being available in the
+API struct with a use of memcpy() to copy the full structure even though
+when only SSID and BSSID was needed. Fix this by replacing that
+easy-to-break storing mechanism with explicit arrays for the exact set
+of needed information.
+
+Fixes: dd1a8cef4c05 ("Remove unnecessary copying of SSID and BSSID for 
external_auth")
+Signed-off-by: Jouni Malinen 
+---
+ wpa_supplicant/sme.c  | 19 ---
+ wpa_supplicant/wpa_supplicant_i.h |  4 +++-
+ 2 files changed, 15 insertions(+), 8 deletions(-)
+
+--- a/wpa_supplicant/sme.c
 b/wpa_supplicant/sme.c
+@@ -965,9 +965,9 @@ static void sme_send_external_auth_statu
+ 
+   os_memset(, 0, sizeof(params));
+   params.status = status;
+-  params.ssid = wpa_s->sme.ext_auth.ssid;
+-  params.ssid_len = wpa_s->sme.ext_auth.ssid_len;
+-  params.bssid = wpa_s->sme.ext_auth.bssid;
++  params.ssid = wpa_s->sme.ext_auth_ssid;
++  params.ssid_len = wpa_s->sme.ext_auth_ssid_len;
++  params.bssid = wpa_s->sme.ext_auth_bssid;
+   wpa_drv_send_external_auth_status(wpa_s, );
+ }
+ 
+@@ -1032,8 +1032,13 @@ void sme_external_auth_trigger(struct wp
+   return;
+ 
+   if (data->external_auth.action == EXT_AUTH_START) {
+-  os_memcpy(_s->sme.ext_auth, data,
+-sizeof(struct external_auth));
++  if (!data->external_auth.bssid || !data->external_auth.ssid)
++  return;
++  os_memcpy(wpa_s->sme.ext_auth_bssid, data->external_auth.bssid,
++ETH_ALEN);
++  os_memcpy(wpa_s->sme.ext_auth_ssid, data->external_auth.ssid,
++data->external_auth.ssid_len);
++  wpa_s->sme.ext_auth_ssid_len = data->external_auth.ssid_len;
+   wpa_s->sme.seq_num = 0;
+   wpa_s->sme.sae.state = SAE_NOTHING;
+   wpa_s->sme.sae.send_confirm = 0;
+@@ -1091,7 +1096,7 @@ static int sme_sae_auth(struct wpa_suppl
+   wpa_s->current_ssid, 2);
+   else
+   sme_external_auth_send_sae_commit(
+-  wpa_s, wpa_s->sme.ext_auth.bssid,
++  wpa_s, wpa_s->sme.ext_auth_bssid,
+   wpa_s->current_ssid);
+   return 0;
+   }
+@@ -1110,7 +1115,7 @@ static int sme_sae_auth(struct wpa_suppl
+   wpa_s->current_ssid, 1);
+   else
+   sme_external_auth_send_sae_commit(
+-  wpa_s, wpa_s->sme.ext_auth.bssid,
++  wpa_s, wpa_s->sme.ext_auth_bssid,
+   wpa_s->current_ssid);
+   return 0;
+   }
+--- a/wpa_supplicant/wpa_supplicant_i.h
 b/wpa_supplicant/wpa_supplicant_i.h
+@@ -802,7 +802,9 @@ struct wpa_supplicant {
+   int sae_group_index;
+   unsigned int sae_pmksa_caching:1;
+   u16 seq_num;
+-  struct external_auth ext_auth;
++  u8 ext_auth_bssid[ETH_ALEN];
++  u8 ext_auth_ssid[SSID_MAX_LEN];
++  size_t ext_auth_ssid_len;
+ #endif /* CONFIG_SAE */
+   } sme;
+ #endif /* CONFIG_SME */
diff --git 
a/package/network/services/hostapd/patches/041-Fix-ENGINE-support-with-OpenSSL-1.1.patch
 
b/package/network/services/hostapd/patches/041-Fix-ENGINE-support-with-OpenSSL-1.1.patch
new file mode 100644
index 00..c130626884
--- /dev/null
+++ 

[OpenWrt-Devel] [PATCH 4/6] hostapd: Remove unneeded patch

2019-05-04 Thread Hauke Mehrtens
All the content of this function is proceeded by IEEE8021X_EAPOL no code
accesses the ssid variable outside of this ifdef.

Signed-off-by: Hauke Mehrtens 
---
 .../hostapd/patches/110-no_eapol_fix.patch | 14 --
 .../services/hostapd/patches/200-multicall.patch   |  6 +++---
 .../services/hostapd/patches/301-mesh-noscan.patch |  4 ++--
 .../hostapd/patches/310-rescan_immediately.patch   |  2 +-
 .../hostapd/patches/370-ap_sta_support.patch   |  8 
 ...ant-add-new-config-params-to-be-used-with.patch |  2 +-
 .../hostapd/patches/464-fix-mesh-obss-check.patch  |  2 +-
 .../hostapd/patches/600-ubus_support.patch |  4 ++--
 8 files changed, 14 insertions(+), 28 deletions(-)
 delete mode 100644 
package/network/services/hostapd/patches/110-no_eapol_fix.patch

diff --git a/package/network/services/hostapd/patches/110-no_eapol_fix.patch 
b/package/network/services/hostapd/patches/110-no_eapol_fix.patch
deleted file mode 100644
index 81b66f8ada..00
--- a/package/network/services/hostapd/patches/110-no_eapol_fix.patch
+++ /dev/null
@@ -1,14 +0,0 @@
 a/wpa_supplicant/wpa_supplicant.c
-+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -296,9 +296,10 @@ void wpa_supplicant_cancel_auth_timeout(
-  */
- void wpa_supplicant_initiate_eapol(struct wpa_supplicant *wpa_s)
- {
-+  struct wpa_ssid *ssid = wpa_s->current_ssid;
-+
- #ifdef IEEE8021X_EAPOL
-   struct eapol_config eapol_conf;
--  struct wpa_ssid *ssid = wpa_s->current_ssid;
- 
- #ifdef CONFIG_IBSS_RSN
-   if (ssid->mode == WPAS_MODE_IBSS &&
diff --git a/package/network/services/hostapd/patches/200-multicall.patch 
b/package/network/services/hostapd/patches/200-multicall.patch
index 7a3a10b895..13b73ebcdd 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -253,7 +253,7 @@
struct wpa_supplicant *wpa_s;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -6087,7 +6087,6 @@ struct wpa_interface * wpa_supplicant_ma
+@@ -6086,7 +6086,6 @@ struct wpa_interface * wpa_supplicant_ma
return NULL;
  }
  
@@ -261,7 +261,7 @@
  /**
   * wpa_supplicant_match_existing - Match existing interfaces
   * @global: Pointer to global data from wpa_supplicant_init()
-@@ -6124,6 +6123,11 @@ static int wpa_supplicant_match_existing
+@@ -6123,6 +6122,11 @@ static int wpa_supplicant_match_existing
  
  #endif /* CONFIG_MATCH_IFACE */
  
@@ -273,7 +273,7 @@
  
  /**
   * wpa_supplicant_add_iface - Add a new network interface
-@@ -6380,6 +6384,8 @@ struct wpa_global * wpa_supplicant_init(
+@@ -6379,6 +6383,8 @@ struct wpa_global * wpa_supplicant_init(
  #ifndef CONFIG_NO_WPA_MSG
wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
  #endif /* CONFIG_NO_WPA_MSG */
diff --git a/package/network/services/hostapd/patches/301-mesh-noscan.patch 
b/package/network/services/hostapd/patches/301-mesh-noscan.patch
index 7f2374424c..e1a54a545e 100644
--- a/package/network/services/hostapd/patches/301-mesh-noscan.patch
+++ b/package/network/services/hostapd/patches/301-mesh-noscan.patch
@@ -31,7 +31,7 @@
if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2139,12 +2139,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -2138,12 +2138,12 @@ void ibss_mesh_setup_freq(struct wpa_sup
  {
enum hostapd_hw_mode hw_mode;
struct hostapd_hw_modes *mode = NULL;
@@ -46,7 +46,7 @@
unsigned int j, k;
struct hostapd_freq_params vht_freq;
int chwidth, seg0, seg1;
-@@ -2214,7 +2214,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -2213,7 +2213,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
return;
  
/* Setup higher BW only for 5 GHz */
diff --git 
a/package/network/services/hostapd/patches/310-rescan_immediately.patch 
b/package/network/services/hostapd/patches/310-rescan_immediately.patch
index 0bf93a6ec2..00fd4ae794 100644
--- a/package/network/services/hostapd/patches/310-rescan_immediately.patch
+++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -4465,7 +4465,7 @@ wpa_supplicant_alloc(struct wpa_supplica
+@@ -4464,7 +4464,7 @@ wpa_supplicant_alloc(struct wpa_supplica
if (wpa_s == NULL)
return NULL;
wpa_s->scan_req = INITIAL_SCAN_REQ;
diff --git a/package/network/services/hostapd/patches/370-ap_sta_support.patch 
b/package/network/services/hostapd/patches/370-ap_sta_support.patch
index 79dc3f56e8..7a1e0402f4 100644
--- a/package/network/services/hostapd/patches/370-ap_sta_support.patch
+++ b/package/network/services/hostapd/patches/370-ap_sta_support.patch
@@ -166,7 +166,7 @@
  /* Configure default/group WEP keys for static WEP */
  int wpa_set_wep_keys(struct wpa_supplicant *wpa_s, struct wpa_ssid 

[OpenWrt-Devel] [PATCH 5/6] hostapd: use getrandom syscall

2019-05-04 Thread Hauke Mehrtens
hostapd will not use the getrandom() syscall and as a fallback use
/dev/random, the syscall is supported since Linux 3.17 and in the musl,
glibc and uclibc version used by OpenWrt.

Signed-off-by: Hauke Mehrtens 
---
 package/network/services/hostapd/files/hostapd-basic.config | 2 +-
 package/network/services/hostapd/files/hostapd-full.config  | 2 +-
 package/network/services/hostapd/files/hostapd-mini.config  | 2 +-
 .../network/services/hostapd/files/wpa_supplicant-basic.config  | 2 +-
 .../network/services/hostapd/files/wpa_supplicant-full.config   | 2 +-
 .../network/services/hostapd/files/wpa_supplicant-mini.config   | 2 +-
 .../network/services/hostapd/files/wpa_supplicant-p2p.config| 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd-basic.config 
b/package/network/services/hostapd/files/hostapd-basic.config
index 9bf3928b0d..da39ba4dd5 100644
--- a/package/network/services/hostapd/files/hostapd-basic.config
+++ b/package/network/services/hostapd/files/hostapd-basic.config
@@ -255,7 +255,7 @@ CONFIG_NO_RANDOM_POOL=y
 # Should we attempt to use the getrandom(2) call that provides more reliable
 # yet secure randomness source than /dev/random on Linux 3.17 and newer.
 # Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
-#CONFIG_GETRANDOM=y
+CONFIG_GETRANDOM=y
 
 # Should we use poll instead of select? Select is used by default.
 #CONFIG_ELOOP_POLL=y
diff --git a/package/network/services/hostapd/files/hostapd-full.config 
b/package/network/services/hostapd/files/hostapd-full.config
index f2e220004f..2a69c777d8 100644
--- a/package/network/services/hostapd/files/hostapd-full.config
+++ b/package/network/services/hostapd/files/hostapd-full.config
@@ -255,7 +255,7 @@ CONFIG_NO_RANDOM_POOL=y
 # Should we attempt to use the getrandom(2) call that provides more reliable
 # yet secure randomness source than /dev/random on Linux 3.17 and newer.
 # Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
-#CONFIG_GETRANDOM=y
+CONFIG_GETRANDOM=y
 
 # Should we use poll instead of select? Select is used by default.
 #CONFIG_ELOOP_POLL=y
diff --git a/package/network/services/hostapd/files/hostapd-mini.config 
b/package/network/services/hostapd/files/hostapd-mini.config
index b8dd53d52b..fdd77cea10 100644
--- a/package/network/services/hostapd/files/hostapd-mini.config
+++ b/package/network/services/hostapd/files/hostapd-mini.config
@@ -255,7 +255,7 @@ CONFIG_NO_RANDOM_POOL=y
 # Should we attempt to use the getrandom(2) call that provides more reliable
 # yet secure randomness source than /dev/random on Linux 3.17 and newer.
 # Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
-#CONFIG_GETRANDOM=y
+CONFIG_GETRANDOM=y
 
 # Should we use poll instead of select? Select is used by default.
 #CONFIG_ELOOP_POLL=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-basic.config 
b/package/network/services/hostapd/files/wpa_supplicant-basic.config
index e88d6c4935..414f5c07ca 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-basic.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-basic.config
@@ -460,7 +460,7 @@ CONFIG_NO_RANDOM_POOL=y
 # Should we attempt to use the getrandom(2) call that provides more reliable
 # yet secure randomness source than /dev/random on Linux 3.17 and newer.
 # Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
-#CONFIG_GETRANDOM=y
+CONFIG_GETRANDOM=y
 
 # IEEE 802.11n (High Throughput) support (mainly for AP mode)
 #CONFIG_IEEE80211N=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-full.config 
b/package/network/services/hostapd/files/wpa_supplicant-full.config
index 61164bfe9a..f4cc241ab5 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-full.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-full.config
@@ -460,7 +460,7 @@ CONFIG_NO_RANDOM_POOL=y
 # Should we attempt to use the getrandom(2) call that provides more reliable
 # yet secure randomness source than /dev/random on Linux 3.17 and newer.
 # Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
-#CONFIG_GETRANDOM=y
+CONFIG_GETRANDOM=y
 
 # IEEE 802.11n (High Throughput) support (mainly for AP mode)
 #CONFIG_IEEE80211N=y
diff --git a/package/network/services/hostapd/files/wpa_supplicant-mini.config 
b/package/network/services/hostapd/files/wpa_supplicant-mini.config
index fb7d42b940..fb8e49e75f 100644
--- a/package/network/services/hostapd/files/wpa_supplicant-mini.config
+++ b/package/network/services/hostapd/files/wpa_supplicant-mini.config
@@ -460,7 +460,7 @@ CONFIG_NO_RANDOM_POOL=y
 # Should we attempt to use the getrandom(2) call that provides more reliable
 # yet secure randomness source than /dev/random on Linux 3.17 and newer.
 # Requires glibc 2.25 to build, falls back to /dev/random if unavailable.
-#CONFIG_GETRANDOM=y
+CONFIG_GETRANDOM=y
 
 # IEEE 

Re: [OpenWrt-Devel] [PATCH v2 1/2] base-files: improve lib/upgrade/common.sh

2019-05-04 Thread Christian Lamparter
On Friday, May 3, 2019 9:38:46 PM CEST Petr Štetiar wrote:
> Klaus Kudielka  [2019-05-03 20:16:39]:
> 
> > Let me remind you that the common one *alone* breaks sysupgrade for those
> > four targets, as Tomasz already pointed out earlier.
> 
> Well, how could I know what was wrong with v1 if you didn't included the
> changes between v1 -> v2 in your v2 patch :-)
> 
> Anyway, thanks for the explanation, it wasn't that much clear to me from the
> commit message, so if you don't mind, I'll include the details there as well
> in order to help it better understand to other folks.
> 
> Merged into my staging tree 
> https://git.openwrt.org/?p=openwrt/staging/ynezz.git;a=commit;h=195178f88ee7b3815f9bea66a2454ccfdf2135a5
> 
> > In more detail:
> > 
> > The root of the problem is that the *existing* export_bootdevice in
> > /lib/upgrade/common.sh behaves differently, if the kernel is booted with
> > root=/dev/..., or if it is booted with root=PARTUUID=...
> > 
> > In the former case, it reports back major/minor of the root partition,
> > in the latter case it reports back major/minor of the complete boot disk.
> > 
> > The targets mentioned above have added workarounds to this behaviour, by
> > specifying *negative* increments to the export_partdevice function.
> > 
> > And then came the mvebu target to use export_bootdevice /
> > export_partdevice as well. Now, different subtargets boot differently,
> > and the workaround would be even more complex.
> > 
> > I think now is the time to make export_bootdevice behave consistently,
> > and to report major/minor of the boot disk, period.

Just a note here:

The export_bootdevice with it's PARTUUID-02 / sd[a-z]2 handling is not that
great. Ideally the fixed partition should be avoided altogether in favour of
a unique filesystem label or (less ideal) a filesystem UUID.

Trouble is that squashfs does not support either. So that's where the fixed
PARTUUID and sdX/mmcX device names come into play because otherwise the devices
wouldn't boot.  Sadly I think changes like this will probably go on until 
either squashfs gets these metadata image features or something replaces
squashfs that has it.

> > 
> > Consequently, those targets, which boot with root=/dev/... *and* use
> > export_bootdevice / export_partdevice, have to be adapted to use
> > positive increments, otherwise they are broken by the change
> > to export_bootdevice.
> > 
> > The targets affected were easy to spot with find & grep.
True, it would have been great if the commit message included that
export_bootdevice now consistenly works on those devices when the
root= in the cmdline matches that PARTUUID-02, sd[a-z]2 or mmcblk[0-9]p2
and nothing else.

Because there are still a few devices (I think Gemini DIR-685, DIR-313
and SQ201, and a Kirkwood GoFlex Home) that have the root= on sda1 or
sda4 and could be converted to use the export_bootdevice for sysupgrade.

But as of yet, I don't see that any of these devices have sysupgrade support.
So your proposed patch is fine, unless you want to come up with a solution
that can deal with the odd-balls.. Because that would be awesome! 

Cheers,
Christian



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


Re: [OpenWrt-Devel] [PATCH 6/8] mvebu: add vendor to device names

2019-05-04 Thread Tomasz Maciej Nowak
Hi Hauke, Petr,

W dniu 04.05.2019 o 00:38, Petr Štetiar pisze:
> Hauke Mehrtens  [2019-05-04 00:00:25]:
> 
> Hi,
> 
>> On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
>>> Replace SoC names with vendors in device names, in few cases, and add
>>> vendor to developemnt boards for easier identyfying potential firmware to
>>> flash.
>>
>> Will sysupgrade still work after this rename? Isn't there some script
>> which checks if the image is compatible with the currently installed image?
> 
> SUPPORTED_DEVICES variable is used for this, so it's probably going to work,
> but if we're willing to rename it, it might be a good idea to follow the DT
> compatible naming scheme as used in other targets.
> 
> So instead of this in patch 4/8:
> 
>  -  SUPPORTED_DEVICES = $$(DEVICE_DTS)
>  +  SUPPORTED_DEVICES = $$(firstword $$(DEVICE_DTS))
> 
> Tomasz should be doing following:
> 
>  -  SUPPORTED_DEVICES = $$(DEVICE_DTS)
>  +  SUPPORTED_DEVICES = $(subst _,$(comma),$(1))

Ideally that would be the case, unfortunately there is inconsistency in the 
upstream
dtses, for example (stand after my patch renaming device names):

linksys-wrt1200ac has compatible linksys,caiman,

marvell-armada-385-db-ap -> marvell,a385-db-ap

marvell-armada-3720-db -> marvell,armada-3720-db

marvell-macchiatobin -> marvell,armada8040-mcbin

marvell-armada-8040-db -> marvell,armada8040-db

As You can see this differs a lot. So what would be best approach, following
upstream naming or keep it as is or following upstream where possible?

> 
> as currently being used in apm821xx, ath79, ipq40xx, ipq806x, kirkwood, 
> lantiq,
> omap, oxnas and ramips.
> 
> So this
> 
>>> -define Device/armada-3720-db
>>> +define Device/marvell-armada-3720-db
> 
> would become
> 
>>> -define Device/armada-3720-db
>>> +define Device/marvell_armada-3720-db
> 
> and this
> 
>>> -TARGET_DEVICES += armada-3720-db
>>> +TARGET_DEVICES += marvell-armada-3720-db
> 
> would become 
> 
>>> -TARGET_DEVICES += armada-3720-db
>>> +TARGET_DEVICES += marvell_armada-3720-db
>>> -SUPPORTED_DEVICES := marvell,armada-3720-db
> 
> as the SUPPORTED_DEVICES variable would be automagically set to the same value
> by the code above, following the DRY principle.
> 
> If the SUPPORTED_DEVICES variable is going to change as for example here:
> 
>>> -define Device/openblocks-ax3-4
>>> +define Device/plathome_openblocks-ax3-4
>>>DEVICE_DTS := armada-xp-openblocks-ax3-4
>>> -  SUPPORTED_DEVICES := $(1)
>>> +  SUPPORTED_DEVICES := openblocks-ax3-4
>>>BLOCKSIZE := 128k
>>>PAGESIZE := 1
>>>IMAGES += factory.img
>>>IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi
>>>DEVICE_TITLE := Plat'Home OpenBlocks AX3
>>>  endef
>>> -TARGET_DEVICES += openblocks-ax3-4
>>> +TARGET_DEVICES += plathome_openblocks-ax3-4
> 
> The old `openblocks-ax3-4` name has to be added by following construct:
> 
>  SUPPORTED_DEVICES += openblocks-ax3-4
> 
> in order to support the old and new naming schemes, so the SUPPORTED_DEVICES
> would actually contain `plathome,openblocks-ax3-4 openblocks-ax3-4` and allow
> seamless sysupgrade experience.
> 
> -- ynezz
> 

Regards

-- 
TMN

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


Re: [OpenWrt-Devel] [PATCH 8/8] mvebu: add images for additional ESPRESSObin boards

2019-05-04 Thread Tomasz Maciej Nowak
W dniu 04.05.2019 o 00:11, Hauke Mehrtens pisze:
> On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
>> This commit adds support for different iterations of ESPRESSObin.
>> The added variants are:
>>
>> ESPRESSObin with soldered eMMC,
>>
>> ESPRESSObin V7, compared to V5 some passive elements changed and ethernet
>> ports labels positions have been reversed,
>>
>> ESPRESSObin V7 with soldered eMMC.
>>
>> Please refer to:
>> 584d7c5 ("mvebu: new subtarget cortex A53")
>> for instruction how to boot OpenWrt image placed on SD card. It is
>> advised for owners of V5 and previous to upgrade bootloader based on
>> U-Boot 2015.01, to the latest version available at:
>> http://espressobin.net/tech-spec.
>>
>> Signed-off-by: Tomasz Maciej Nowak 
>> ---
>>  .../marvell/armada-3720-espressobin-emmc.dts  | 28 +++
>>  .../armada-3720-espressobin-v7-emmc.dts   | 43 
>>  .../marvell/armada-3720-espressobin-v7.dts| 31 
>>  target/linux/mvebu/image/cortex-a53.mk| 24 +
>>  ...l-armada37xx-Add-emmc-sdio-pinctrl-d.patch | 40 +++
>>  ...l-armada-37xx-Enable-emmc-on-espress.patch | 49 +++
>>  ...da-3720-espressobin-correct-spi-node.patch |  2 +-
>>  ...l-armada-3720-espressobin-add-ports-.patch | 26 ++
>>  8 files changed, 242 insertions(+), 1 deletion(-)
>>  create mode 100644 
>> target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts
>>  create mode 100644 
>> target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
>>  create mode 100644 
>> target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts
>>  create mode 100644 
>> target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch
>>  create mode 100644 
>> target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch
>>  create mode 100644 
>> target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch
>>
>> diff --git 
>> a/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts
>>  
>> b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts
>> new file mode 100644
>> index 00..ef90a1bd38
>> --- /dev/null
>> +++ 
>> b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts
>> @@ -0,0 +1,28 @@
>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +/*
>> + * Device Tree file for Globalscale Marvell ESPRESSOBin Board with eMMC
>> + * Copyright (C) 2018 Marvell
>> + *
>> + * Romain Perier 
>> + * Konstantin Porotchkin 
>> + *
>> + */
>> +
>> +#include "armada-3720-espressobin.dts"
>> +
>> +/ {
>> +model = "Globalscale Marvell ESPRESSOBin Board (eMMC)";
>> +compatible = "globalscale,espressobin-emmc", "globalscale,espressobin",
>> + "marvell,armada3720", "marvell,armada3710";
>> +};
>> +
>> + {
>> +status = "okay";
>> +
>> +#address-cells = <1>;
>> +#size-cells = <0>;
>> +mmccard: mmccard@0 {
>> +compatible = "mmc-card";
>> +reg = <0>;
>> +};
>> +};
>> diff --git 
>> a/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
>>  
>> b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
>> new file mode 100644
>> index 00..2b565ca8d8
>> --- /dev/null
>> +++ 
>> b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts
>> @@ -0,0 +1,43 @@
>> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
>> +/*
>> + * Device Tree file for Globalscale Marvell ESPRESSOBin Board V7 with eMMC
>> + * Copyright (C) 2018 Marvell
>> + *
>> + * Romain Perier 
>> + * Konstantin Porotchkin 
>> + *
>> + */
>> +
>> +#include "armada-3720-espressobin.dts"
>> +
>> +/ {
>> +model = "Globalscale Marvell ESPRESSOBin Board V7 (eMMC)";
>> +compatible = "globalscale,espressobin-v7-emmc", 
>> "globalscale,espressobin-v7",
>> + "globalscale,espressobin", "marvell,armada3720",
>> + "marvell,armada3710";
>> +};
>> +
>> + {
>> +port@1 {
>> +reg = <1>;
>> +label = "lan1";
>> +phy-handle = <>;
>> +};
>> +
>> +port@3 {
>> +reg = <3>;
>> +label = "wan";
>> +phy-handle = <>;
>> +};
>> +};
>> +
>> + {
>> +status = "okay";
>> +
>> +#address-cells = <1>;
>> +#size-cells = <0>;
>> +mmccard: mmccard@0 {
>> +compatible = "mmc-card";
>> +reg = <0>;
>> +};
>> +};
> 
> Are these device tree files already send upstream or will you do so?

They are not sent yet. They'll need a small rework, I'll handle that after 
preparing
GRUB upgrade patches.

> 
> Hauke
> 


-- 
TMN

___
openwrt-devel mailing list

Re: [OpenWrt-Devel] [PATCH 6/8] mvebu: add vendor to device names

2019-05-04 Thread Tomasz Maciej Nowak
Hi,

W dniu 04.05.2019 o 00:04, Hauke Mehrtens pisze:
> On 5/1/19 7:42 PM, Tomasz Maciej Nowak wrote:
>> Replace SoC names with vendors in device names, in few cases, and add
>> vendor to developemnt boards for easier identyfying potential firmware to
>> flash.
>>
>> Signed-off-by: Tomasz Maciej Nowak 
> 
> 
>> diff --git a/target/linux/mvebu/image/cortex-a72.mk 
>> b/target/linux/mvebu/image/cortex-a72.mk
>> index 824f6b5d0f..3043f087cc 100644
>> --- a/target/linux/mvebu/image/cortex-a72.mk
>> +++ b/target/linux/mvebu/image/cortex-a72.mk
>> @@ -1,30 +1,30 @@
>>  ifeq ($(SUBTARGET),cortexa72)
>>  
>> -define Device/armada-macchiatobin
>> +define Device/marvell-macchiatobin
>>$(call Device/Default-arm64)
>>DEVICE_TITLE := MACCHIATObin (SolidRun Armada 8040 Community Board)
>>DEVICE_PACKAGES += kmod-i2c-core kmod-i2c-mux kmod-i2c-mux-pca954x
>>DEVICE_DTS := armada-8040-mcbin
>>SUPPORTED_DEVICES := marvell,armada8040-mcbin
>>  endef
>> -TARGET_DEVICES += armada-macchiatobin
>> +TARGET_DEVICES += marvell-macchiatobin
> 
> This board is from solidrun

Yes, this case did make me confused. I went with what's in model and compatible
string in dts. SolidRun also calls it that way:
https://www.solid-run.com/marvell-armada-family/macchiatobin
But I'll change that in next version.

Regards

-- 
TMN

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


Re: [OpenWrt-Devel] [PATCH] tegra: add vendor string to device name

2019-05-04 Thread Tomasz Maciej Nowak
Hi,

W dniu 03.05.2019 o 13:21, Petr Štetiar pisze:
> Tomasz Maciej Nowak  [2019-05-01 19:43:54]:
> 
> Hi,
> 
>> for better identification. Also create SUPPORTED_DEVICES string from it
>> which corresponds to dts compatible string.
>>
>> Signed-off-by: Tomasz Maciej Nowak 
> 
> ...
> 
>>  define U-Boot/trimslice
>>NAME := CompuLab TrimSlice
>> -  BUILD_DEVICES := trimslice
>> +  BUILD_DEVICES := compulab_trimslice
>>UBOOT_IMAGE := trimslice-mmc.img trimslice-spi.img
> 
> what about this files? Shouldn't you rename them as well?

That could be done, but I left it as is, to be in line with cbootimage-configs:
https://github.com/NVIDIA/cbootimage-configs/blob/7c3b458b93ed6947cd083623f543e93f9103cc0f/tegra20/compulab/trimslice/trimslice-mmc.img.cfg#L22

> 
> -- ynezz
> 

Regards

-- 
TMN

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


Re: [OpenWrt-Devel] [PATCH v2] ramips: Add support for Head Weblink HDRM200

2019-05-04 Thread Kristian Evensen
Hi Petr,

Thanks a lot for your feedback. I have implemented most of it and the
board seems to work fine, but I have some questions.

On Fri, May 3, 2019 at 6:32 PM Petr Štetiar  wrote:
> > In order to install OpenWRT, you first need to compile an initramfs
> > (ramdisk)-image for the device.
>
> if the ramdisk image is needed, then we probably should enable it for that
> target and provide it, we shouldn't demand end users to build the ramdisk
> images by themselves in order to be able to install OpenWrt, right?
>
> This needs adding `ramdisk` in FEATURES in target.mk.

I agree, building a ramdisk-image by default would be preferable.
However, wont adding ramdisk to FEATURES build a ramdisk image for all
mt7620-boards? Do you know any way to avoid that?

Also, I am having some issues getting a ramdisk image to be built by
default. After adding ramdisk to FEATURES, I still need to manually
choose to build a ramdisk image. I have spent some time looking into
the different mk-files to try to figure out what could be wrong, but
without any luck. Do you have any pointers?

> > The image should now be loaded to memory and board boot. If the router
> > reboots while the image is loading, you need to try again.
>
> Why does it reboot? Is there any kind of watchdog? Do you get any error in the
> bootloader?

Why the board reboots is a good question. I tried to ask the
manufacturer, but got no answer. There are no errors  as the board
just suddenly reboots, but I do suspect that there is some kind of
watchdog triggering the reboots. The reboot seems to occur after
roughly the same time, but something needs to happen for the reboot to
be triggered. For example, I can idle on the bootloader command line
for as long as I want. However, if I wait sufficiently long before
pressing enter, then the board reboots.

> > + {
> > + state_default: pinctrl0 {
> > + default {
> > + ralink,group = "i2c", "uartf", "pa", "spi refclk", 
> > "wled";
> > + ralink,function = "gpio";
> > + };
> > + };
> > +};
>
> ...

I have to admit that I don't understand what you are refering to there
(unless it is the too long "ralink,group"-line) :)

Thanks again for your comments!

BR,
Kristian

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