Re: [LEDE-DEV] [PATCH] brcm2708: add squashfs rootfs image

2018-03-28 Thread Daniel Golle
On Tue, Mar 27, 2018 at 07:42:18PM +0200, Christian Lamparter wrote:
> This patch adds a image with squashfs as the root filesystem.
> A rootfs_data partition will be generated on the first boot
> and placed inside the rootfs partition (just after the squashfs
> image).
> 
> advantages:
>  - it is possible to migrate from an existing -ext4
>installation and back via sysupgrade.
>  - existing partition layout will not be lost.
>  - slightly smaller image size.
>  - support for attendedsysupgrade
> 
> disadvantages:
>  - needs f2fs + tools as well. This is because fs-tools decides on the
>blocksize of the sdcard. So either f2fs or ext4 can get choosen as
>the rootfs_data filesystem (depends on the size of the root partition).
>  - rootfs_data is placed into the rootfs partition. This makes
>it difficult for tools that expect a /dev/mmc0pX device.
>It also makes it difficult for data recovery tools since they
>might not expect to find a embedded partition or will be
>confused.
> 
> For people with existing build configurations: make sure to include mkf2fs
> and f2fsck package into the image... Otherwise the new -squashfs image will
> boot of a ram-overlay and won't keep the configurations after a reboot.
> 
> Cc: Álvaro Fernández Rojas 
> Cc: Paul Spooren 
> Cc: Daniel Golle 
> Signed-off-by: Christian Lamparter 

Acked-by: Daniel Golle 

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] [PATCH] Kernel: bump 4.4 to 4.4.124 for 17.01

2018-03-28 Thread Stijn Segers
 * Refreshed patches
 * Removed 087-Revert-led-core-Fix-brightness-setting-when-setting-.patch 
(applied upstream)

 Compile-tested on ar71xx, ramips/mt7621, x86/64
 Run-tested on ar71xx

Signed-off-by: Stijn Segers 
---
 include/kernel-version.mk  |   4 +-
 .../patches-4.4/910-unaligned_access_hacks.patch   |   2 +-
 .../patches-4.4/0029-Add-dwc_otg-driver.patch  |   2 +-
 ...core-Fix-brightness-setting-when-setting-.patch |  28 --
 .../098-usb-dwc2-Remove-unnecessary-kfree.patch|   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |  12 +--
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch |  10 +-
 .../generic/patches-4.4/721-phy_packets.patch  |   2 +-
 .../generic/patches-4.4/902-debloat_proc.patch |   4 +-
 .../generic/patches-4.4/904-debloat_dma_buf.patch  |   2 +-
 ...f-esdhc-add-remove-some-quirks-according-.patch |   2 +-
 ...ers-mmc-Add-compatible-string-for-LS1046A.patch |   2 +-
 ...mtd-backport-v4.7-0day-patches-from-Boris.patch | 112 ++---
 ...mtd-backport-v4.7-0day-patches-from-Boris.patch | 112 ++---
 ...0074-mtd-nand-import-nand_hw_control_init.patch |   2 +-
 .../0032-USB-dwc2-add-device_reset.patch   |   2 +-
 .../0039-mtd-add-mt7621-nand-support.patch |   2 +-
 .../0040-nand-add-mtk-nand-hack-hook.patch |   6 +-
 .../patches-4.4/0901-spansion_nand_id_fix.patch|   4 +-
 19 files changed, 142 insertions(+), 170 deletions(-)
 delete mode 100644 
target/linux/generic/patches-4.4/087-Revert-led-core-Fix-brightness-setting-when-setting-.patch

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 5cc0200893..deb13a6a82 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -3,10 +3,10 @@
 LINUX_RELEASE?=1
 
 LINUX_VERSION-3.18 = .43
-LINUX_VERSION-4.4 = .120
+LINUX_VERSION-4.4 = .124
 
 LINUX_KERNEL_HASH-3.18.43 = 
1236e8123a6ce537d5029232560966feed054ae31776fe8481dd7d18cdd5492c
-LINUX_KERNEL_HASH-4.4.120 = 
a25f07372a2661c577e3c8a395bfb4a9f277518a01d097275604eccd3689f478
+LINUX_KERNEL_HASH-4.4.124 = 
59341c0af64bf0e2ba6f5305bff564286c228755827b8bebd002a9db2abc2129
 
 ifdef KERNEL_PATCHVER
   LINUX_VERSION:=$(KERNEL_PATCHVER)$(strip $(LINUX_VERSION-$(KERNEL_PATCHVER)))
diff --git a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch 
b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
index 72d964df63..7858abc64b 100644
--- a/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.4/910-unaligned_access_hacks.patch
@@ -359,7 +359,7 @@
for (p = *head; p; p = p->next) {
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -458,7 +458,7 @@ static struct neighbour *ipv4_neigh_look
+@@ -461,7 +461,7 @@ static struct neighbour *ipv4_neigh_look
else if (skb)
pkey = _hdr(skb)->daddr;
  
diff --git a/target/linux/brcm2708/patches-4.4/0029-Add-dwc_otg-driver.patch 
b/target/linux/brcm2708/patches-4.4/0029-Add-dwc_otg-driver.patch
index 561fcaed10..b94c0e0e06 100644
--- a/target/linux/brcm2708/patches-4.4/0029-Add-dwc_otg-driver.patch
+++ b/target/linux/brcm2708/patches-4.4/0029-Add-dwc_otg-driver.patch
@@ -670,7 +670,7 @@ dwc_otg: Remove duplicate gadget probe/unregister function
msleep(100);/* Cool down */
 --- a/drivers/usb/core/message.c
 +++ b/drivers/usb/core/message.c
-@@ -1909,6 +1909,85 @@ free_interfaces:
+@@ -1913,6 +1913,85 @@ free_interfaces:
if (cp->string == NULL &&
!(dev->quirks & USB_QUIRK_CONFIG_INTF_STRINGS))
cp->string = usb_cache_string(dev, cp->desc.iConfiguration);
diff --git 
a/target/linux/generic/patches-4.4/087-Revert-led-core-Fix-brightness-setting-when-setting-.patch
 
b/target/linux/generic/patches-4.4/087-Revert-led-core-Fix-brightness-setting-when-setting-.patch
deleted file mode 100644
index 6378ed4351..00
--- 
a/target/linux/generic/patches-4.4/087-Revert-led-core-Fix-brightness-setting-when-setting-.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 4b98deaa353d8f7af3f7543d0b59497fe1275599 Mon Sep 17 00:00:00 2001
-Message-Id: 
<4b98deaa353d8f7af3f7543d0b59497fe1275599.1520544136.git.mschif...@universe-factory.net>
-From: Matthias Schiffer 
-Date: Thu, 8 Mar 2018 22:22:08 +0100
-Subject: [PATCH] Revert "led: core: Fix brightness setting when setting
- delay_off=0"
-
-This reverts commit 20ac8f72514b3af8b62c520d55656ded865eff00.

- drivers/leds/led-core.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
-index 92b6798ef5b3..c1c3af089634 100644
 a/drivers/leds/led-core.c
-+++ b/drivers/leds/led-core.c
-@@ -149,7 +149,7 @@ void led_blink_set(struct led_classdev *led_cdev,
-  unsigned long *delay_on,
-  unsigned long *delay_off)
- {
--  led_stop_software_blink(led_cdev);
-+  

[LEDE-DEV] [PATCH iwinfo] nl80211: fix code calculating average signal and rate

2018-03-28 Thread Rafał Miłecki
From: Rafał Miłecki 

Using average of previous average and the next value is highly
imprecise. E.g. for values 20, 20, 20, 180 it would result in /average/
of 100 (instead of 60). Fix it by storing & using an info of how many
samples were used for the previous calculation.

Signed-off-by: Rafał Miłecki 
---
 iwinfo_nl80211.c | 14 +++---
 iwinfo_nl80211.h |  2 ++
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/iwinfo_nl80211.c b/iwinfo_nl80211.c
index 738e2f5..de5d2b4 100644
--- a/iwinfo_nl80211.c
+++ b/iwinfo_nl80211.c
@@ -1279,7 +1279,8 @@ static int nl80211_fill_signal_cb(struct nl_msg *msg, 
void *arg)
if (sinfo[NL80211_STA_INFO_SIGNAL])
{
dbm = 
nla_get_u8(sinfo[NL80211_STA_INFO_SIGNAL]);
-   rr->rssi = rr->rssi ? (int8_t)((rr->rssi + dbm) 
/ 2) : dbm;
+   rr->rssi = (rr->rssi * rr->rssi_samples + dbm) 
/ (rr->rssi_samples + 1);
+   rr->rssi_samples++;
}
 
if (sinfo[NL80211_STA_INFO_TX_BITRATE])
@@ -1291,8 +1292,8 @@ static int nl80211_fill_signal_cb(struct nl_msg *msg, 
void *arg)
if (rinfo[NL80211_RATE_INFO_BITRATE])
{
mbit = 
nla_get_u16(rinfo[NL80211_RATE_INFO_BITRATE]);
-   rr->rate = rr->rate
-   ? (int16_t)((rr->rate + 
mbit) / 2) : mbit;
+   rr->rate = (rr->rate * 
rr->rate_samples + mbit) / (rr->rate_samples + 1);
+   rr->rate_samples++;
}
}
}
@@ -1307,8 +1308,7 @@ static void nl80211_fill_signal(const char *ifname, 
struct nl80211_rssi_rate *r)
DIR *d;
struct dirent *de;
 
-   r->rssi = 0;
-   r->rate = 0;
+   memset(r, 0, sizeof(*r));
 
if ((d = opendir("/sys/class/net")) != NULL)
{
@@ -1333,7 +1333,7 @@ static int nl80211_get_bitrate(const char *ifname, int 
*buf)
 
nl80211_fill_signal(ifname, );
 
-   if (rr.rate)
+   if (rr.rate_samples)
{
*buf = (rr.rate * 100);
return 0;
@@ -1348,7 +1348,7 @@ static int nl80211_get_signal(const char *ifname, int 
*buf)
 
nl80211_fill_signal(ifname, );
 
-   if (rr.rssi)
+   if (rr.rssi_samples)
{
*buf = rr.rssi;
return 0;
diff --git a/iwinfo_nl80211.h b/iwinfo_nl80211.h
index 566ffce..2dff08b 100644
--- a/iwinfo_nl80211.h
+++ b/iwinfo_nl80211.h
@@ -59,7 +59,9 @@ struct nl80211_group_conveyor {
 
 struct nl80211_rssi_rate {
int16_t rate;
+   int rate_samples;
int8_t  rssi;
+   int rssi_samples;
 };
 
 struct nl80211_array_buf {
-- 
2.11.0


___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] [PATCH] leds-apu2: add newer board names

2018-03-28 Thread Matthias May
On 28/03/18 04:40, Philip Prindeville wrote:
> “recent”?  I thought APU2’s had been discontinued a while ago.
> 
> 
> 

You're probably thinking of the APU.
It hasn't been discontinued yet, but isn't recommended for new installations.
The APU2 is the successor of the APU, and the recommended longterm device.
There is also the APU3 which is basically an APU2, but optimised for
LTE (second SIM slot, different GPIO layout, option to PCIe slot, etc.)

BR
Matthias

___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev