Re: [OpenWrt-Devel] [PATCH] ath79: eg200: enable status led usage

2019-09-04 Thread David Bauer
Hello Karl,

On 9/3/19 6:57 PM, Karl Palsson wrote:
> 
> 
> Karl Pálsson   wrote:
>>
>> Signed-off-by: Karl Palsson 
>> ---
> 
> It's minor, but if someone picks this, please _don't_ change my
> SoB to match the email. The original source commits and all git
> config names are unaccented, and it's how I use my name, it's
> just the office365 mail server that is "mangling" my name, and
> it's not to be trusted. (ref:
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=075c570cde08c2a27f7e2a64995cc74ae52b5704
> where it actually was "matched SoB to email" unlike the comment)

Git won't let me push to master without a on-matching SoB.

$ git push upstream upstream-master:master
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 4 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.20 KiB | 616.00 KiB/s, done.
Total 11 (delta 7), reused 0 (delta 0)
remote: No matching SoB line found for author Karl Pálsson 
remote:  in commit a155a153e0949aefd9147061f9a00a0d91d4400a
remote: 
To git.openwrt.org:openwrt/openwrt.git
 ! [remote rejected]   upstream-master -> master (pre-receive hook declined)
error: failed to push some refs to 'g...@git.openwrt.org:openwrt/openwrt.git'

Best wishes
David

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


Re: [OpenWrt-Devel] [PATCH] base-files: fix get_mac_address not accepting hex offsets

2019-09-04 Thread David Bauer
Hello Adrian,

On 9/4/19 10:08 PM, m...@adrianschmutzler.de wrote:
> when I tested it then, the hexdump offset did accept hexadecimal values 
> intrinsically.
> I remember that because I was quite surprised that offset accepted 
> hexadecimal values and size didn't.

This might be the case for hexdump, however dd does not accept hexadecimal 
values.

The commit message is indeed not correct in that regard. However I've changed 
the
evaluation there too, as originally it was provided decimal numbers, keeping the
underlying call stable.

Best wishes
David

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


Re: [OpenWrt-Devel] [PATCH] base-files: fix get_mac_address not accepting hex offsets

2019-09-04 Thread mail
Hi, 

> -Original Message- 
> From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] 
> On Behalf Of David Bauer 
> Sent: Mittwoch, 4. September 2019 21:19 
> To: openwrt-devel@lists.openwrt.org 
> Cc: m...@adrianschmutzler.de 
> Subject: [OpenWrt-Devel] [PATCH] base-files: fix get_mac_address not 
> accepting hex offsets 
> 
> The get_mac_address helper methods did not support hexadecimal offset 
> values, resulting them to break after 75bfc393ba6c ("treewide: 
> convert MAC address location offsets to hexadecimal") 

when I tested it then, the hexdump offset did accept hexadecimal values 
intrinsically. 
I remember that because I was quite surprised that offset accepted hexadecimal 
values and size didn't. 

In particular I've always been using get_mac_binary with hexadecimal values as 
second argument. 
Or am I misunderstanding you somewhere? 

However, converting it as in this patch doesn't hurt, especially if the 
behavior of hexdump changes in the future. 

Best 

Adrian 


openpgp-digital-signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] base-files: fix get_mac_address not accepting hex offsets

2019-09-04 Thread David Bauer
The get_mac_address helper methods did not support hexadecimal offset
values, resulting them to break after 75bfc393ba6c ("treewide:
convert MAC address location offsets to hexadecimal")

This commit fixes this by evaluating the hexadecimal input,
converting them to decimal.

Signed-off-by: David Bauer 
---
 package/base-files/files/lib/functions/system.sh | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/base-files/files/lib/functions/system.sh 
b/package/base-files/files/lib/functions/system.sh
index 9b9d03df7b..4a97b27f5a 100644
--- a/package/base-files/files/lib/functions/system.sh
+++ b/package/base-files/files/lib/functions/system.sh
@@ -2,7 +2,7 @@
 
 get_mac_binary() {
local path="$1"
-   local offset="$2"
+   local offset=$(($2))
 
if ! [ -e "$path" ]; then
echo "get_mac_binary: file $path not found!" >&2
@@ -40,7 +40,7 @@ mtd_get_mac_ascii() {
 
 mtd_get_mac_text() {
local mtdname=$1
-   local offset=$2
+   local offset=$(($2))
local part
local mac_dirty
 
@@ -63,7 +63,7 @@ mtd_get_mac_text() {
 
 mtd_get_mac_binary() {
local mtdname="$1"
-   local offset="$2"
+   local offset=$(($2))
local part
 
part=$(find_mtd_part "$mtdname")
@@ -72,7 +72,7 @@ mtd_get_mac_binary() {
 
 mtd_get_mac_binary_ubi() {
local mtdname="$1"
-   local offset="$2"
+   local offset=$(($2))
 
. /lib/upgrade/nand.sh
 
-- 
2.23.0


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


[OpenWrt-Devel] [PATCH 19.07] kernel: add disable_eap_hack sysfs attribute

2019-09-04 Thread Etienne Champetier
We are not sure if 640-bridge-only-accept-EAP-locally.patch is still needed
as a first step, add disable_eap_hack sysfs config to allow to disable it

Signed-off-by: Etienne Champetier 
(cherry picked from commit 7d542dc8047d276517b296132926e722004065e0)
---
 .../640-bridge-only-accept-EAP-locally.patch  | 59 +--
 1 file changed, 55 insertions(+), 4 deletions(-)

diff --git 
a/target/linux/generic/hack-4.14/640-bridge-only-accept-EAP-locally.patch 
b/target/linux/generic/hack-4.14/640-bridge-only-accept-EAP-locally.patch
index 0dbb8ee3c0..fbe9ab0876 100644
--- a/target/linux/generic/hack-4.14/640-bridge-only-accept-EAP-locally.patch
+++ b/target/linux/generic/hack-4.14/640-bridge-only-accept-EAP-locally.patch
@@ -1,4 +1,3 @@
-From c6905cfdeb31a5c049db3da434b10fa0d3e83569 Mon Sep 17 00:00:00 2001
 From: Felix Fietkau 
 Date: Fri, 7 Jul 2017 17:18:54 +0200
 Subject: bridge: only accept EAP locally
@@ -7,9 +6,9 @@ When bridging, do not forward EAP frames to other ports, only 
deliver
 them locally, regardless of the state.
 
 Signed-off-by: Felix Fietkau 
+[add disable_eap_hack sysfs attribute]
+Signed-off-by: Etienne Champetier 
 ---
- net/bridge/br_input.c | 7 +--
- 1 file changed, 5 insertions(+), 2 deletions(-)
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
@@ -19,7 +18,7 @@ Signed-off-by: Felix Fietkau 
  
 +  BR_INPUT_SKB_CB(skb)->brdev = br->dev;
 +
-+  if (skb->protocol == htons(ETH_P_PAE))
++  if (skb->protocol == htons(ETH_P_PAE) && !br->disable_eap_hack)
 +  return br_pass_frame_up(skb);
 +
if (p->state == BR_STATE_LEARNING)
@@ -29,3 +28,55 @@ Signed-off-by: Felix Fietkau 
BR_INPUT_SKB_CB(skb)->src_port_isolated = !!(p->flags & BR_ISOLATED);
  
if (IS_ENABLED(CONFIG_INET) && skb->protocol == htons(ETH_P_ARP))
+--- a/net/bridge/br_private.h
 b/net/bridge/br_private.h
+@@ -320,6 +320,8 @@ struct net_bridge {
+   u16 group_fwd_mask;
+   u16 group_fwd_mask_required;
+ 
++  booldisable_eap_hack;
++
+   /* STP */
+   bridge_id   designated_root;
+   bridge_id   bridge_id;
+--- a/net/bridge/br_sysfs_br.c
 b/net/bridge/br_sysfs_br.c
+@@ -170,6 +170,30 @@ static ssize_t group_fwd_mask_store(stru
+ }
+ static DEVICE_ATTR_RW(group_fwd_mask);
+ 
++static ssize_t disable_eap_hack_show(struct device *d,
++ struct device_attribute *attr,
++ char *buf)
++{
++  struct net_bridge *br = to_bridge(d);
++  return sprintf(buf, "%u\n", br->disable_eap_hack);
++}
++
++static int set_disable_eap_hack(struct net_bridge *br, unsigned long val)
++{
++  br->disable_eap_hack = !!val;
++
++  return 0;
++}
++
++static ssize_t disable_eap_hack_store(struct device *d,
++  struct device_attribute *attr,
++  const char *buf,
++  size_t len)
++{
++  return store_bridge_parm(d, buf, len, set_disable_eap_hack);
++}
++static DEVICE_ATTR_RW(disable_eap_hack);
++
+ static ssize_t priority_show(struct device *d, struct device_attribute *attr,
+char *buf)
+ {
+@@ -817,6 +841,7 @@ static struct attribute *bridge_attrs[]
+   _attr_ageing_time.attr,
+   _attr_stp_state.attr,
+   _attr_group_fwd_mask.attr,
++  _attr_disable_eap_hack.attr,
+   _attr_priority.attr,
+   _attr_bridge_id.attr,
+   _attr_root_id.attr,
-- 
2.21.0


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


Re: [OpenWrt-Devel] AR10 GPHYs (WAS: Re: [lantiq] general help on AR10 platform)

2019-09-04 Thread Hauke Mehrtens
Hi Enrico,


On 9/4/19 6:48 PM, Martin Blumenstingl wrote:
> Hi Enrico,
> 
> On Wed, Sep 4, 2019 at 12:07 PM Enrico Mioso  wrote:
>>
>> Hi there!
>>
>> So I am trying to get ethernet working on this AR10 device.
>> It has 3 GPHYs:

I did some fixes for the reset bits,, the rest is ok.

>>
>> gphy0: gphy@20 {
>> compatible = "lantiq,xrx300-gphy";
>> reg = <0x20 0x4>;
>>
>> resets = < 31 30>, < 7 7>;
resets = < 31 30>, < 6 6>;
>> reset-names = "gphy", "gphy2";
>> };
>>
>> gphy1: gphy@58 {
>> compatible = "lantiq,xrx300-gphy";
>> reg = <0x58 0x4>;
>>
>> resets = < 29 28>, < 6 6>;
resets = < 29 28>, < 7 7>;
>> reset-names = "gphy", "gphy2";
>> };
>>
>> gphy2: gphy@ac {
>> compatible = "lantiq,xrx300-gphy";
>> reg = <0xac 0x4>;
>> resets = < 27 26>, < 5 5>;
resets = < 28 13>, < 8 8>;
>> reset-names = "gphy", "gphy2";
>> };
>>
>> And firmware load addresses for GPHYs are correct as per the vendor code:
>> #define IFX_RCU_GPHY0_FW_ADDR   ((volatile u32*)(IFX_RCU + 
>> 0x0020))
>> #define IFX_RCU_GPHY1_FW_ADDR   ((volatile u32*)(IFX_RCU + 
>> 0x0058))
>> #define IFX_RCU_GPHY2_FW_ADDR   ((volatile u32*)(IFX_RCU + 
>> 0x00AC))
> the register part of your .dts looks fine based on this
> 
>> But driver was failing to initialize due to missing clock gates.
>> In sysctrl.c, we have:
>> clkdev_add_pmu("1f203020.gphy", NULL, 1, 0, PMU_GPHY); // OK for GPHY0
>> clkdev_add_pmu("1f203068.gphy", NULL, 1, 0, PMU_GPHY); //problem for GPHY1
>>
>> And GPHY2?
> the UGW kernel documents all the PMUs in
> drivers/char/ifxmips_pmu_SOC.h, in your case that is:
> drivers/char/ifxmips_pmu_ar10.h [0]
> I don't remember how to translate that file to an English sentence but
> you can figure it out on your own (for example by comparing the vr9
> sysctrl.c code with
> 
> resets are found in the same directory but a different file: 
> ifxmips_rcu_ar10.h
> 
> (sorry for the short answer but I have to leave in a few minutes)

Be aware that the GPHYs are connected to different ports of the GSWIP
compared to the VR9. With the upstream DSA driver you should be able to
define this mostly in device tree.

GMAC0: RGMII port
GMAC2: GPHY0 (GMII)
GMAC3: GPHY0 (MII)
GMAC4: GPHY1 (GMII)
GMAC5: GPHY1 (MII) or RGMII port
GMAC1: GPHY2 (GMII)

Hauke



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


Re: [OpenWrt-Devel] AR10 GPHYs (WAS: Re: [lantiq] general help on AR10 platform)

2019-09-04 Thread Martin Blumenstingl via openwrt-devel
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.--- Begin Message ---
Hi Enrico,

On Wed, Sep 4, 2019 at 12:07 PM Enrico Mioso  wrote:
>
> Hi there!
>
> So I am trying to get ethernet working on this AR10 device.
> It has 3 GPHYs:
>
> gphy0: gphy@20 {
> compatible = "lantiq,xrx300-gphy";
> reg = <0x20 0x4>;
>
> resets = < 31 30>, < 7 7>;
> reset-names = "gphy", "gphy2";
> };
>
> gphy1: gphy@58 {
> compatible = "lantiq,xrx300-gphy";
> reg = <0x58 0x4>;
>
> resets = < 29 28>, < 6 6>;
> reset-names = "gphy", "gphy2";
> };
>
> gphy2: gphy@ac {
> compatible = "lantiq,xrx300-gphy";
> reg = <0xac 0x4>;
> resets = < 27 26>, < 5 5>;
> reset-names = "gphy", "gphy2";
> };
>
> And firmware load addresses for GPHYs are correct as per the vendor code:
> #define IFX_RCU_GPHY0_FW_ADDR   ((volatile u32*)(IFX_RCU + 
> 0x0020))
> #define IFX_RCU_GPHY1_FW_ADDR   ((volatile u32*)(IFX_RCU + 
> 0x0058))
> #define IFX_RCU_GPHY2_FW_ADDR   ((volatile u32*)(IFX_RCU + 
> 0x00AC))
the register part of your .dts looks fine based on this

> But driver was failing to initialize due to missing clock gates.
> In sysctrl.c, we have:
> clkdev_add_pmu("1f203020.gphy", NULL, 1, 0, PMU_GPHY); // OK for GPHY0
> clkdev_add_pmu("1f203068.gphy", NULL, 1, 0, PMU_GPHY); //problem for GPHY1
>
> And GPHY2?
the UGW kernel documents all the PMUs in
drivers/char/ifxmips_pmu_SOC.h, in your case that is:
drivers/char/ifxmips_pmu_ar10.h [0]
I don't remember how to translate that file to an English sentence but
you can figure it out on your own (for example by comparing the vr9
sysctrl.c code with

resets are found in the same directory but a different file: ifxmips_rcu_ar10.h

(sorry for the short answer but I have to leave in a few minutes)


happy hacking!
Martin


[0] 
https://github.com/uwehermann/easybox-904-xdsl-firmware/blob/master/linux/linux-2.6.32.32/drivers/char/ifxmips_pmu_ar10.h

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


[OpenWrt-Devel] [PATCH 2/2] treewide: when copying a backup file always specify dest name

2019-09-04 Thread Rafał Miłecki
From: Rafał Miłecki 

$CONF_TAR shouldn't be assumed to always point to the sysupgrade.tgz.
This change makes code more generic and allows refactoring $CONF_TAR.

Signed-off-by: Rafał Miłecki 
---
 target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh   | 2 +-
 target/linux/brcm2708/base-files/lib/upgrade/platform.sh | 2 +-
 target/linux/imx6/base-files/lib/upgrade/platform.sh | 2 +-
 target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh | 2 +-
 target/linux/mediatek/base-files/lib/upgrade/platform.sh | 2 +-
 target/linux/mvebu/base-files/lib/upgrade/linksys.sh | 2 +-
 target/linux/mvebu/base-files/lib/upgrade/sdcard.sh  | 2 +-
 target/linux/mvebu/base-files/lib/upgrade/uDPU.sh| 2 +-
 target/linux/octeon/base-files/lib/upgrade/platform.sh   | 2 +-
 target/linux/omap/base-files/lib/upgrade/platform.sh | 2 +-
 target/linux/sunxi/base-files/lib/upgrade/platform.sh| 2 +-
 target/linux/tegra/base-files/lib/upgrade/platform.sh| 2 +-
 target/linux/x86/base-files/lib/upgrade/platform.sh  | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh 
b/target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh
index 01327d926a..e3de6ed0b5 100644
--- a/target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh
+++ b/target/linux/apm821xx/base-files/lib/upgrade/wdbook.sh
@@ -88,7 +88,7 @@ mbl_copy_config() {
 
if export_partdevice partdev 1; then
mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt
-   cp -af "$CONF_TAR" /mnt/
+   cp -af "$CONF_TAR" "/mnt/$BACKUP_FILE"
umount /mnt
fi
 }
diff --git a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh 
b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
index 693cde7779..48994ebe07 100644
--- a/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
+++ b/target/linux/brcm2708/base-files/lib/upgrade/platform.sh
@@ -91,7 +91,7 @@ platform_copy_config() {
if export_partdevice partdev 1; then
mkdir -p /boot
[ -f /boot/kernel.img ] || mount -t vfat -o rw,noatime 
"/dev/$partdev" /boot
-   cp -af "$CONF_TAR" /boot/
+   cp -af "$CONF_TAR" "/boot/$BACKUP_FILE"
tar -C / -zxvf "$CONF_TAR" boot/config.txt
sync
unmount /boot
diff --git a/target/linux/imx6/base-files/lib/upgrade/platform.sh 
b/target/linux/imx6/base-files/lib/upgrade/platform.sh
index 0dfaf0163d..f72e552a36 100755
--- a/target/linux/imx6/base-files/lib/upgrade/platform.sh
+++ b/target/linux/imx6/base-files/lib/upgrade/platform.sh
@@ -17,7 +17,7 @@ enable_image_metadata_check
 
 apalis_copy_config() {
apalis_mount_boot
-   cp -af "$CONF_TAR" /boot/
+   cp -af "$CONF_TAR" "/boot/$BACKUP_FILE"
sync
umount /boot
 }
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh 
b/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh
index ec7d04..e9fb0ad388 100644
--- a/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh
+++ b/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh
@@ -60,7 +60,7 @@ zyxel_do_flash() {
mkdir /tmp/new_root
mount -t ext4 $loopdev /tmp/new_root && {
echo "Saving config to rootfs_data at position ${offset}."
-   cp -v "$CONF_TAR" /tmp/new_root/
+   cp -v "$CONF_TAR" "/tmp/new_root/$BACKUP_FILE"
umount /tmp/new_root
}
 
diff --git a/target/linux/mediatek/base-files/lib/upgrade/platform.sh 
b/target/linux/mediatek/base-files/lib/upgrade/platform.sh
index d812a48720..d1b9fdeb95 100755
--- a/target/linux/mediatek/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/base-files/lib/upgrade/platform.sh
@@ -54,7 +54,7 @@ platform_check_image() {
 platform_copy_config_emmc() {
mkdir -p /recovery
mount -o rw,noatime /dev/mmcblk0p1 /recovery
-   cp -af "$CONF_TAR" /recovery/
+   cp -af "$CONF_TAR" "/recovery/$BACKUP_FILE"
sync
umount /recovery
 }
diff --git a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh 
b/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
index 857c550c73..5104db31f3 100644
--- a/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
+++ b/target/linux/mvebu/base-files/lib/upgrade/linksys.sh
@@ -93,6 +93,6 @@ platform_do_upgrade_linksys() {
 }
 
 platform_copy_config_linksys() {
-   cp -f "$CONF_TAR" /tmp/syscfg/
+   cp -f "$CONF_TAR" "/tmp/syscfg/$BACKUP_FILE"
sync
 }
diff --git a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh 
b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
index 3bfdce97e8..03f6327657 100644
--- a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
+++ b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh
@@ -106,7 +106,7 @@ platform_copy_config_sdcard() {
if export_partdevice partdev 1; then
mkdir -p /boot
[ -f /boot/kernel.img ] || 

[OpenWrt-Devel] [PATCH 1/2] treewide: don't hardcode "sysupgrade.tgz" file name

2019-09-04 Thread Rafał Miłecki
From: Rafał Miłecki 

1) Add BACKUP_FILE and use it when copying an archive to be restored
   after sysupgrade (on the next preinit).
2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade

Signed-off-by: Rafał Miłecki 
---
 package/base-files/files/lib/upgrade/common.sh |  2 ++
 package/base-files/files/lib/upgrade/nand.sh   |  2 +-
 .../apm821xx/base-files/lib/preinit/79_move_config |  3 ++-
 .../brcm2708/base-files/lib/preinit/79_move_config |  4 +++-
 .../linux/imx6/base-files/lib/preinit/79_move_config   |  3 ++-
 target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh   |  2 +-
 .../mediatek/base-files/lib/preinit/79_move_config |  4 +++-
 .../linux/mvebu/base-files/lib/preinit/79_move_config  |  2 +-
 .../mvebu/base-files/lib/preinit/81_linksys_syscfg | 10 +-
 target/linux/mvebu/base-files/lib/preinit/82_uDPU  |  8 
 target/linux/mvebu/base-files/lib/upgrade/linksys.sh   |  2 +-
 target/linux/mvebu/base-files/lib/upgrade/uDPU.sh  |  4 ++--
 .../linux/octeon/base-files/lib/preinit/79_move_config |  3 ++-
 .../linux/omap/base-files/lib/preinit/79_move_config   |  4 ++--
 .../linux/sunxi/base-files/lib/preinit/79_move_config  |  4 ++--
 .../linux/tegra/base-files/lib/preinit/79_move_config  |  4 ++--
 target/linux/x86/base-files/lib/preinit/79_move_config |  4 ++--
 17 files changed, 37 insertions(+), 28 deletions(-)

diff --git a/package/base-files/files/lib/upgrade/common.sh 
b/package/base-files/files/lib/upgrade/common.sh
index efa301cd95..279470fcd8 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -2,6 +2,8 @@
 
 RAM_ROOT=/tmp/root
 
+export BACKUP_FILE=sysupgrade.tgz  # file extracted by preinit
+
 [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
 libs() { ldd $* 2>/dev/null | sed -r 's/(.* => )?(.*) .*/\2/'; }
 
diff --git a/package/base-files/files/lib/upgrade/nand.sh 
b/package/base-files/files/lib/upgrade/nand.sh
index fbc2b5c19a..e7d7bf8d13 100644
--- a/package/base-files/files/lib/upgrade/nand.sh
+++ b/package/base-files/files/lib/upgrade/nand.sh
@@ -109,7 +109,7 @@ nand_restore_config() {
rmdir /tmp/new_root
return 1
fi
-   mv "$1" "/tmp/new_root/sysupgrade.tgz"
+   mv "$1" "/tmp/new_root/$BACKUP_FILE"
umount /tmp/new_root
sync
rmdir /tmp/new_root
diff --git a/target/linux/apm821xx/base-files/lib/preinit/79_move_config 
b/target/linux/apm821xx/base-files/lib/preinit/79_move_config
index cb5e5c759d..37d35b663b 100644
--- a/target/linux/apm821xx/base-files/lib/preinit/79_move_config
+++ b/target/linux/apm821xx/base-files/lib/preinit/79_move_config
@@ -4,13 +4,14 @@ BOOTPART=/dev/sda1
 
 move_config() {
. /lib/functions.sh
+   . /lib/upgrade/common.sh
 
case "$(board_name)" in
wd,mybooklive)
if [ -b $BOOTPART ]; then
mkdir -p /boot
mount -t ext4 -o rw,noatime $BOOTPART /boot
-   [ -f /boot/sysupgrade.tgz ] && mv -f 
/boot/sysupgrade.tgz /
+   [ -f "/boot/$BACKUP_FILE" ] && mv -f 
"/boot/$BACKUP_FILE" /
fi
;;
*)
diff --git a/target/linux/brcm2708/base-files/lib/preinit/79_move_config 
b/target/linux/brcm2708/base-files/lib/preinit/79_move_config
index b0ee62a809..b8738b645e 100644
--- a/target/linux/brcm2708/base-files/lib/preinit/79_move_config
+++ b/target/linux/brcm2708/base-files/lib/preinit/79_move_config
@@ -1,6 +1,8 @@
 #!/bin/sh
 # Copyright (C) 2015 OpenWrt.org
 
+. /lib/upgrade/common.sh
+
 BOOTPART=/dev/mmcblk0p1
 
 move_config() {
@@ -11,7 +13,7 @@ move_config() {
insmod vfat
mkdir -p /boot
mount -t vfat -o rw,noatime $BOOTPART /boot
-   [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
+   [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
fi
 }
 
diff --git a/target/linux/imx6/base-files/lib/preinit/79_move_config 
b/target/linux/imx6/base-files/lib/preinit/79_move_config
index 6b66fbd42d..bdf397c4fc 100644
--- a/target/linux/imx6/base-files/lib/preinit/79_move_config
+++ b/target/linux/imx6/base-files/lib/preinit/79_move_config
@@ -2,6 +2,7 @@
 
 . /lib/imx6.sh
 . /lib/functions.sh
+. /lib/upgrade/common.sh
 
 move_config() {
local board=$(board_name)
@@ -10,7 +11,7 @@ move_config() {
apalis*)
if [ -b $(bootpart_from_uuid) ]; then
apalis_mount_boot
-   [ -f /boot/sysupgrade.tgz ] && mv -f 
/boot/sysupgrade.tgz /
+   [ -f "/boot/$BACKUP_FILE" ] && mv -f 
"/boot/$BACKUP_FILE" /
umount /boot
fi
;;
diff --git a/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh 
b/target/linux/ipq806x/base-files/lib/upgrade/zyxel.sh
index 33cd98339c..ec7d04 

[OpenWrt-Devel] AR10 GPHYs (WAS: Re: [lantiq] general help on AR10 platform)

2019-09-04 Thread Enrico Mioso

Hi there!

So I am trying to get ethernet working on this AR10 device.
It has 3 GPHYs:

gphy0: gphy@20 {
compatible = "lantiq,xrx300-gphy";
reg = <0x20 0x4>;

resets = < 31 30>, < 7 7>;
reset-names = "gphy", "gphy2";
};

gphy1: gphy@58 {
compatible = "lantiq,xrx300-gphy";
reg = <0x58 0x4>;

resets = < 29 28>, < 6 6>;
reset-names = "gphy", "gphy2";
};

gphy2: gphy@ac {
compatible = "lantiq,xrx300-gphy";
reg = <0xac 0x4>;
resets = < 27 26>, < 5 5>;
reset-names = "gphy", "gphy2";
};

And firmware load addresses for GPHYs are correct as per the vendor code:
#define IFX_RCU_GPHY0_FW_ADDR   ((volatile u32*)(IFX_RCU + 
0x0020))
#define IFX_RCU_GPHY1_FW_ADDR   ((volatile u32*)(IFX_RCU + 
0x0058))
#define IFX_RCU_GPHY2_FW_ADDR   ((volatile u32*)(IFX_RCU + 
0x00AC))

But driver was failing to initialize due to missing clock gates.
In sysctrl.c, we have:
clkdev_add_pmu("1f203020.gphy", NULL, 1, 0, PMU_GPHY); // OK for GPHY0
clkdev_add_pmu("1f203068.gphy", NULL, 1, 0, PMU_GPHY); //problem for GPHY1

And GPHY2?

Attaching complete AR10 DTS I obtained collecting informations from various 
sources.
I would ask you if you could kindly help me pointing out mistakes,.
I am sure I am accumulating a fair amount of useless stuff in this file.
Enrico

#include 

/ {
#address-cells = <1>;
#size-cells = <1>;
compatible = "lantiq,xway", "lantiq,ar10";

aliases {
serial0 = 
};

chosen {
stdout-path = "serial0:115200n8";
};

cpus {
cpu@0 {
compatible = "mips,mips34Kc";
};
cpu@1 {
compatible = "mips,mips34Kc";
};
};

memory@0 {
device_type = "memory";
};

cputemp@0 {
compatible = "lantiq,cputemp";
};

biu@1f80 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "lantiq,biu", "simple-bus";
reg = <0x1f80 0x80>;
ranges = <0x0 0x1f80 0x7f>;

icu0: icu0@80200 {
#interrupt-cells = <1>;
interrupt-controller;
compatible = "lantiq,icu";
reg = <0x80200 0x28
0x80228 0x28
0x80250 0x28
0x80278 0x28
0x802a0 0x28>;
};

icu1: icu1@80300 {
#interrupt-cells = <1>;
interrupt-controller;
compatible = "lantiq,icu1";
reg = <0x80300 0x28
0x80328 0x28
0x80350 0x28
0x80378 0x28
0x803a0 0x28>;
};

watchdog@803f0 {
compatible = "lantiq,xrx100-wdt";
reg = <0x803f0 0x10>;
regmap = <>;
};
};

sram@1f00 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "lantiq,sram", "simple-bus";
reg = <0x1f00 0x80>;
ranges = <0x0 0x1f00 0x7f>;

eiu0: eiu@101000 {
#interrupt-cells = <1>;
interrupt-controller;
compatible = "lantiq,eiu-xway";
reg = <0x101000 0x1000>;
interrupt-parent = <>;
lantiq,eiu-irqs = <166 135 66 40 41 42>;
};

pmu0: pmu@102000 {
compatible = "lantiq,pmu-xway";
reg = <0x102000 0x1000>;
};

cgu0: cgu@103000 {
compatible = "lantiq,cgu-xway";
reg = <0x103000 0x1000>;
};

ts: ts@106f00 {
compatible = "lantiq,ts-grx390"; /* to revisit */
reg = <0x106f00 0x10>;
interrupt-parent = <>;
interrupts = <143>;
lantiq,numofsensors = 

Re: [OpenWrt-Devel] OpenWrt 19.07 release schedule ?

2019-09-04 Thread Jo-Philipp Wich
Hi,

> Buildbot is already crunching the images and packages, and pretty much
> all targets are green. So there are no obvious build related issues
> preventing the release. I have also not noticed any franctic discussion
> about specific major bugs blocking the release, so it looks pretty good
> at the moment.

there are various LuCI bugs which need to be addressed first.

> Has the actual release timetable been discussed? When could we expect
> first official release builds?

Afair there's been no recent discussions.

> I think that it would be good to get the initial .0 done, so that the
> wider user base could sysupgrade from 18.06 to 19.07 and the testing by
> the larger user base could start.

I'll try to allocate some time during the next week to produce tagged
builds.


~ Jo

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