[OpenWrt-Devel] [PATCH] iwinfo: add several QC/A device ids

2019-11-01 Thread Tomislav Požega
Add device ids for AR9462, QCA9862, QCA9880 v1 mPCIe cards and
Ubiquiti branded QCA9880 v2 PCI wifi found in LiteBeam 5ac.

Signed-off-by: Tomislav Požega 
---
--- a/hardware.txt
+++ b/hardware.txt
@@ -1,6 +1,7 @@
 # libiwinfo hardware database
 # vendor id | device id | subsystem vendor id | subsystem device id |
 # txpower offset | frequency offset | "vendor name" | "device name"
+0x0777 0x11ac 0x0777 0xe7f90  0  "Ubiquiti" "LiteBeam 5AC"
 0x 0x 0x 0xb1020  0  "Ubiquiti" "PowerStation2 (18V)"
 0x 0x 0x 0xb2020  0  "Ubiquiti" "PowerStation2 (16D)"
 0x 0x 0x 0xb3020  0  "Ubiquiti" "PowerStation2 (EXT)"
@@ -152,7 +153,10 @@
 0x168c 0x0033 0x19b6 0xd0140  0  "MikroTik" "R11e-5HnD"
 0x168c 0x0033 0x19b6 0xd0570  0  "MikroTik" "R11e-5HnDr2"
 0x168c 0x0033 0x19b6 0xd0160  0  "MikroTik" "R11e-2HPnD"
+0x168c 0x0034 0x17aa 0x32140  0  "Atheros"  "AR9462"
 0x168c 0x003c 0x 0x0  0  "Qualcomm Atheros" "QCA9880"
+0x168c 0x003c 0x168c 0x32230  0  "Qualcomm Atheros" "QCA9880"
+0x168c 0x003c 0x1a56 0x14200  0  "Qualcomm Atheros" "QCA9862"
 0x168c 0x003c 0x19b6 0xd03c0  0  "Mikrotik" "R11e-5HacT"
 0x168c 0x0046 0x168c 0xcafe0  0  "Qualcomm Atheros" "QCA9984"
 0x168c 0x0050 0x 0x0  0  "Qualcomm Atheros" "QCA9887"

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


[OpenWrt-Devel] [PATCH 3/3] mac80211: ath10k: reset chip after supported check

2019-04-01 Thread Tomislav Požega
When chip reset is done before the chip is checked if supported
there will be crash. Previous behaviour caused bootloops on
Archer C7 v1 units, this patch allows clean device boot without
excluding ath10k driver.

Signed-off-by: Tomislav Požega 
---
 ...0-ath10k-reset-chip-after-supported-check.patch |   39 
 1 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 
package/kernel/mac80211/patches/ath/980-ath10k-reset-chip-after-supported-check.patch

diff --git 
a/package/kernel/mac80211/patches/ath/980-ath10k-reset-chip-after-supported-check.patch
 
b/package/kernel/mac80211/patches/ath/980-ath10k-reset-chip-after-supported-check.patch
new file mode 100644
index 000..81ca5e1
--- /dev/null
+++ 
b/package/kernel/mac80211/patches/ath/980-ath10k-reset-chip-after-supported-check.patch
@@ -0,0 +1,39 @@
+From: Tomislav Požega 
+Date: Fri, 22 Mar 2019 19:06:25 +0100
+Subject: [PATCH] ath10k: reset chip after supported check
+
+When chip reset is done before the chip is checked if supported
+there will be crash. Previous behaviour caused bootloops on
+Archer C7 v1 units, this patch allows clean device boot without
+excluding ath10k driver.
+
+Signed-off-by: Tomislav Požega 
+
+--- a/drivers/net/wireless/ath/ath10k/pci.c
 b/drivers/net/wireless/ath/ath10k/pci.c
+@@ -3612,12 +3612,6 @@ static int ath10k_pci_probe(struct pci_d
+   goto err_deinit_irq;
+   }
+ 
+-  ret = ath10k_pci_chip_reset(ar);
+-  if (ret) {
+-  ath10k_err(ar, "failed to reset chip: %d\n", ret);
+-  goto err_free_irq;
+-  }
+-
+   chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
+   if (chip_id == 0x) {
+   ath10k_err(ar, "failed to get chip id\n");
+@@ -3630,6 +3624,12 @@ static int ath10k_pci_probe(struct pci_d
+   goto err_free_irq;
+   }
+ 
++  ret = ath10k_pci_chip_reset(ar);
++  if (ret) {
++  ath10k_err(ar, "failed to reset chip: %d\n", ret);
++  goto err_free_irq;
++  }
++
+   ret = ath10k_core_register(ar, chip_id);
+   if (ret) {
+   ath10k_err(ar, "failed to register driver core: %d\n", ret);
-- 
1.7.0.4


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


[OpenWrt-Devel] [PATCH 2/3] ath79: switch back to ath10k driver and firmware

2019-04-01 Thread Tomislav Požega
Switch Archer C7 v1 back to regular ath10k driver and firmware
since it contains fix for bootloop issue present with
QCA9880-AR1A.

Signed-off-by: Tomislav Požega 
---
 target/linux/ath79/image/generic-tp-link.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target/linux/ath79/image/generic-tp-link.mk 
b/target/linux/ath79/image/generic-tp-link.mk
index 19a156b..2642f16 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -68,7 +68,7 @@ define Device/tplink_archer-c7-v1
   $(Device/tplink-8mlzma)
   ATH_SOC := qca9558
   DEVICE_TITLE := TP-Link Archer C7 v1
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport 
kmod-ath10k-ct ath10k-firmware-qca988x-ct
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport 
kmod-ath10k ath10k-firmware-qca988x
   TPLINK_HWID := 0x7501
 endef
 TARGET_DEVICES += tplink_archer-c7-v1
-- 
1.7.0.4


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


[OpenWrt-Devel] [PATCH 1/3] ar71xx: add ath10k package for Archer C7 v1

2019-04-01 Thread Tomislav Požega
This series patch fixes bootloop issue and device starts
normally with QCA9880-AR1A in mPCIe slot.
Another card tested is QCA9862 and is detected and starts
properly.

Signed-off-by: Tomislav Požega 
---
 target/linux/ar71xx/image/generic-tp-link.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/target/linux/ar71xx/image/generic-tp-link.mk 
b/target/linux/ar71xx/image/generic-tp-link.mk
index 6fda7f3..d4345e2 100644
--- a/target/linux/ar71xx/image/generic-tp-link.mk
+++ b/target/linux/ar71xx/image/generic-tp-link.mk
@@ -95,7 +95,7 @@ TARGET_DEVICES += archer-c5-v1
 define Device/archer-c7-v1
   $(Device/tplink-8mlzma)
   DEVICE_TITLE := TP-LINK Archer C7 v1
-  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
+  DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport 
kmod-ath10k ath10k-firmware-qca988x
   BOARDNAME := ARCHER-C7
   DEVICE_PROFILE := ARCHERC7
   TPLINK_HWID := 0x7501
-- 
1.7.0.4


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


[OpenWrt-Devel] [PATCH] ath10k: reset chip after supported check

2019-03-22 Thread Tomislav Požega
When chip reset is done before the chip is checked if supported
there will be crash. Previous behaviour caused bootloops on
Archer C7 v1 units, this patch allows clean device boot without
excluding ath10k driver.

Signed-off-by: Tomislav Požega 
---
 drivers/net/wireless/ath/ath10k/pci.c |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c 
b/drivers/net/wireless/ath/ath10k/pci.c
index e24403c..ec681da 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -3619,12 +3619,6 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
goto err_deinit_irq;
}
 
-   ret = ath10k_pci_chip_reset(ar);
-   if (ret) {
-   ath10k_err(ar, "failed to reset chip: %d\n", ret);
-   goto err_free_irq;
-   }
-
bus_params.dev_type = ATH10K_DEV_TYPE_LL;
bus_params.link_can_suspend = true;
bus_params.chip_id = ath10k_pci_soc_read32(ar, SOC_CHIP_ID_ADDRESS);
@@ -3639,6 +3633,12 @@ static int ath10k_pci_probe(struct pci_dev *pdev,
goto err_free_irq;
}
 
+   ret = ath10k_pci_chip_reset(ar);
+   if (ret) {
+   ath10k_err(ar, "failed to reset chip: %d\n", ret);
+   goto err_free_irq;
+   }
+
ret = ath10k_core_register(ar, _params);
if (ret) {
ath10k_err(ar, "failed to register driver core: %d\n", ret);
-- 
1.7.0.4


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


[OpenWrt-Devel] [PATCH 1/2] mac80211: 5/10 MHz channel width support for ath9k_htc

2018-09-06 Thread Tomislav Požega
Add 5/10 MHz channel width support for ath9k_htc driver. Connection tested
between several devices and working.

Signed-off-by: Tomislav Požega 
---
 .../patches/512-ath9k_channelbw_debugfs.patch  |   62 
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch 
b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
index 2ebb73d..9349c07 100644
--- a/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
+++ b/package/kernel/mac80211/patches/512-ath9k_channelbw_debugfs.patch
@@ -123,3 +123,65 @@
  
return channel;
  }
+--- a/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
 b/drivers/net/wireless/ath/ath9k/htc_drv_debug.c
+@@ -398,6 +398,50 @@ static const struct file_operations fops
+   .llseek = default_llseek,
+ };
+ 
++static ssize_t read_file_chan_bw(struct file *file, char __user *user_buf,
++   size_t count, loff_t *ppos)
++{
++  struct ath9k_htc_priv *priv = file->private_data;
++  struct ath_common *common = ath9k_hw_common(priv->ah);
++  char buf[32];
++  unsigned int len;
++
++  len = sprintf(buf, "0x%08x\n", common->chan_bw);
++  return simple_read_from_buffer(user_buf, count, ppos, buf, len);
++}
++
++static ssize_t write_file_chan_bw(struct file *file, const char __user 
*user_buf,
++   size_t count, loff_t *ppos)
++{
++  struct ath9k_htc_priv *priv = file->private_data;
++  struct ath_common *common = ath9k_hw_common(priv->ah);
++  unsigned long chan_bw;
++  char buf[32];
++  ssize_t len;
++
++  len = min(count, sizeof(buf) - 1);
++  if (copy_from_user(buf, user_buf, len))
++  return -EFAULT;
++
++  buf[len] = '\0';
++  if (kstrtoul(buf, 0, _bw))
++  return -EINVAL;
++
++  common->chan_bw = chan_bw;
++  if (!test_bit(ATH_OP_INVALID, >op_flags))
++  ath9k_htc_ops.config(priv->hw, IEEE80211_CONF_CHANGE_CHANNEL);
++
++  return count;
++}
++
++static const struct file_operations fops_chanbw = {
++  .read = read_file_chan_bw,
++  .write = write_file_chan_bw,
++  .open = simple_open,
++  .owner = THIS_MODULE,
++  .llseek = default_llseek,
++};
++
+ /* Ethtool support for get-stats */
+ #define AMKSTR(nm) #nm "_BE", #nm "_BK", #nm "_VI", #nm "_VO"
+ static const char ath9k_htc_gstrings_stats[][ETH_GSTRING_LEN] = {
+@@ -520,5 +564,8 @@ int ath9k_htc_init_debug(struct ath_hw *
+   ath9k_cmn_debug_base_eeprom(priv->debug.debugfs_phy, priv->ah);
+   ath9k_cmn_debug_modal_eeprom(priv->debug.debugfs_phy, priv->ah);
+ 
++  debugfs_create_file("chanbw", S_IRUSR | S_IWUSR, 
priv->debug.debugfs_phy,
++  priv, _chanbw);
++
+   return 0;
+ }
-- 
1.7.0.4


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


[OpenWrt-Devel] [PATCH 2/2] mac80211: expose chanbw support to debugfs for ath9k_htc

2018-09-06 Thread Tomislav Požega
This will ensure the htc suffixed driver also gets created
chanbw debugfs entry.

Signed-off-by: Tomislav Požega 
---
 .../mac80211/files/lib/netifd/wireless/mac80211.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh 
b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
index 244260a..ea827bd 100644
--- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
+++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh
@@ -772,7 +772,7 @@ drv_mac80211_setup() {
staidx=0
 
[ -n "$chanbw" ] && {
-   for file in /sys/kernel/debug/ieee80211/$phy/ath9k/chanbw 
/sys/kernel/debug/ieee80211/$phy/ath5k/bwmode; do
+   for file in /sys/kernel/debug/ieee80211/$phy/ath9k*/chanbw 
/sys/kernel/debug/ieee80211/$phy/ath5k/bwmode; do
[ -f "$file" ] && echo "$chanbw" > "$file"
done
}
-- 
1.7.0.4


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


[OpenWrt-Devel] [PATCH] [trunk] packages: aircrack-ng: fix airmon-ng output in multi bssid mode

2016-02-18 Thread Tomislav Požega
Create a patch that removes the output of unnecessary interface
informations which occur if the radio broadcasts more than one ssid to
speed up the operation and provide clean output. Also removes
scanProcesses function to get rid of the busybox output garbage.

Signed-off-by: Tomislav Požega <pozega.tomis...@gmail.com>
---
Removing the scanProcesses function should not affect the operations
since the function is intended for distributions that use external
network-managers and daemons.

diff -purN
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch 
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
---
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
1970-01-01 01:00:00.0 +0100
+++
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
2016-02-08 03:21:30.743649000 +0100
@@ -0,0 +1,105 @@
+--- a/scripts/airmon-ng2014-10-31 21:39:43.0 +0100
 b/scripts/airmon-ng2016-02-08 03:13:34.221319763 +0100
+@@ -101,67 +101,6 @@ getDriver() {
+ 
+ }
+ 
+-scanProcesses() {
+-if [ -f "`which service 2>&1`" ] && [ x"$1" = "xkill" ]
+-then
+-  service network-manager stop 2>/dev/null >/dev/null
+-  service avahi-daemon stop 2>/dev/null >/dev/null
+-fi
+-
+-match=`ps -A -o comm= | grep $PROCESSES | grep -v grep | wc -l`
+-if [ $match -gt 0 -a x"$1" != "xkill" ]
+-then
+-printf "\n\n"
+-echo "Found $match processes that could cause trouble."
+-echo "If airodump-ng, aireplay-ng or airtun-ng stops working
after"
+-echo "a short period of time, you may want to kill (some of)
them!"
+-echo -e "\nPID\tName"
+-else
+-if [ x"$1" != "xkill" ]
+-then
+-return
+-fi
+-fi
+-
+-if [ $match -gt 0 -a x"$1" = "xkill" ]
+-then
+-echo "Killing all those processes..."
+-fi
+-
+-i=1
+-while [ $i -le $match ]
+-do
+-pid=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep |
head -n $i | tail -n 1 | awk '{print $1}'`
+-pname=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep
| head -n $i | tail -n 1 | awk '{print $2}'`
+-if [ x"$1" != "xkill" ]
+-then
+-printf "$pid\t$pname\n"
+-else
+-kill $pid
+-fi
+-i=$(($i+1))
+-done
+-}
+-
+-checkProcessesIface() {
+-if [ x"$1" = "x" ]
+-then
+-return
+-fi
+-
+-match2=`ps -o comm= -p 1 2>&1 | grep $PS_ERROR | grep -v grep | wc
-l`
+-if [ $match2 -gt 0 ]
+-then
+-  return
+-fi
+-
+-for i in `ps auxw | grep $1 | grep -v "grep" | grep -v "airmon-ng"
| awk '{print $2}'`
+-do
+-pname=`ps -o comm= -p $i`
+-echo "Process with PID $i ($pname) is running on interface $1"
+-done
+-}
+-
+ getStack() {
+ if [ x"$1" = "x" ]
+ then
+@@ -505,22 +444,15 @@ iwpriv > /dev/null 2> /dev/null ||
+ 
+ if [ x"$1" = "xcheck" ] || [ x"$1" = "xstart" ]
+ then
+-scanProcesses
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|
WLAN)' | sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|
WLAN)' | sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+-# getModule $iface
+-# getDriver $iface
+-checkProcessesIface $iface
+-done
+ 
+-if [ x"$2" = "xkill" ]
+-then
+-scanProcesses "$2"
+-fi
+ if [ x"$1" = "xcheck" ]
+ then
+ exit
+ fi
++
++done
+ fi
+ 
+ printf "\n\n"
+@@ -605,7 +537,7 @@ then
+   sleep 1s
+ fi
+ 
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)'
| sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)'
| sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+  getModule  $iface
+  getDriver  $iface
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [CC] packages: aircrack-ng: fix airmon-ng output in multi bssid mode

2016-02-18 Thread Tomislav Požega
Create a patch that removes the output of unnecessary interface
informations which occur if the radio broadcasts more than one ssid to
speed up the operation and provide clean output. Also removes
scanProcesses function to get rid of the busybox output garbage.

Signed-off-by: Tomislav Požega <pozega.tomis...@gmail.com>
---
Removing the scanProcesses function should not affect the operations
since the function is intended for distributions that use external
network-managers and daemons.

diff -purN
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch 
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
---
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
1970-01-01 01:00:00.0 +0100
+++
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
2016-02-08 03:21:30.743649000 +0100
@@ -0,0 +1,105 @@
+--- a/scripts/airmon-ng2014-10-31 21:39:43.0 +0100
 b/scripts/airmon-ng2016-02-08 03:13:34.221319763 +0100
+@@ -101,67 +101,6 @@ getDriver() {
+ 
+ }
+ 
+-scanProcesses() {
+-if [ -f "`which service 2>&1`" ] && [ x"$1" = "xkill" ]
+-then
+-  service network-manager stop 2>/dev/null >/dev/null
+-  service avahi-daemon stop 2>/dev/null >/dev/null
+-fi
+-
+-match=`ps -A -o comm= | grep $PROCESSES | grep -v grep | wc -l`
+-if [ $match -gt 0 -a x"$1" != "xkill" ]
+-then
+-printf "\n\n"
+-echo "Found $match processes that could cause trouble."
+-echo "If airodump-ng, aireplay-ng or airtun-ng stops working
after"
+-echo "a short period of time, you may want to kill (some of)
them!"
+-echo -e "\nPID\tName"
+-else
+-if [ x"$1" != "xkill" ]
+-then
+-return
+-fi
+-fi
+-
+-if [ $match -gt 0 -a x"$1" = "xkill" ]
+-then
+-echo "Killing all those processes..."
+-fi
+-
+-i=1
+-while [ $i -le $match ]
+-do
+-pid=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep |
head -n $i | tail -n 1 | awk '{print $1}'`
+-pname=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep
| head -n $i | tail -n 1 | awk '{print $2}'`
+-if [ x"$1" != "xkill" ]
+-then
+-printf "$pid\t$pname\n"
+-else
+-kill $pid
+-fi
+-i=$(($i+1))
+-done
+-}
+-
+-checkProcessesIface() {
+-if [ x"$1" = "x" ]
+-then
+-return
+-fi
+-
+-match2=`ps -o comm= -p 1 2>&1 | grep $PS_ERROR | grep -v grep | wc
-l`
+-if [ $match2 -gt 0 ]
+-then
+-  return
+-fi
+-
+-for i in `ps auxw | grep $1 | grep -v "grep" | grep -v "airmon-ng"
| awk '{print $2}'`
+-do
+-pname=`ps -o comm= -p $i`
+-echo "Process with PID $i ($pname) is running on interface $1"
+-done
+-}
+-
+ getStack() {
+ if [ x"$1" = "x" ]
+ then
+@@ -505,22 +444,15 @@ iwpriv > /dev/null 2> /dev/null ||
+ 
+ if [ x"$1" = "xcheck" ] || [ x"$1" = "xstart" ]
+ then
+-scanProcesses
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|
WLAN)' | sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|
WLAN)' | sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+-# getModule $iface
+-# getDriver $iface
+-checkProcessesIface $iface
+-done
+ 
+-if [ x"$2" = "xkill" ]
+-then
+-scanProcesses "$2"
+-fi
+ if [ x"$1" = "xcheck" ]
+ then
+ exit
+ fi
++
++done
+ fi
+ 
+ printf "\n\n"
+@@ -605,7 +537,7 @@ then
+   sleep 1s
+ fi
+ 
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)'
| sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)'
| sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+  getModule  $iface
+  getDriver  $iface
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [trunk] oldpackages: fix mdk3 build issue

2016-02-18 Thread Tomislav Požega
Create a patch that fixes an issue with mdk3 package that would break
build process when enabled with -Werror=format-security message. Closes
ticket https://dev.openwrt.org/ticket/20698

Signed-off-by: Tomislav Požega <pozega.tomis...@gmail.com>
---

diff -purN
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch 
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
---
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
1970-01-01 01:00:00.0 +0100
+++
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
2016-02-08 03:21:30.743649000 +0100
@@ -0,0 +1,105 @@
+--- a/scripts/airmon-ng2014-10-31 21:39:43.0 +0100
 b/scripts/airmon-ng2016-02-08 03:13:34.221319763 +0100
+@@ -101,67 +101,6 @@ getDriver() {
+ 
+ }
+ 
+-scanProcesses() {
+-if [ -f "`which service 2>&1`" ] && [ x"$1" = "xkill" ]
+-then
+-  service network-manager stop 2>/dev/null >/dev/null
+-  service avahi-daemon stop 2>/dev/null >/dev/null
+-fi
+-
+-match=`ps -A -o comm= | grep $PROCESSES | grep -v grep | wc -l`
+-if [ $match -gt 0 -a x"$1" != "xkill" ]
+-then
+-printf "\n\n"
+-echo "Found $match processes that could cause trouble."
+-echo "If airodump-ng, aireplay-ng or airtun-ng stops working
after"
+-echo "a short period of time, you may want to kill (some of)
them!"
+-echo -e "\nPID\tName"
+-else
+-if [ x"$1" != "xkill" ]
+-then
+-return
+-fi
+-fi
+-
+-if [ $match -gt 0 -a x"$1" = "xkill" ]
+-then
+-echo "Killing all those processes..."
+-fi
+-
+-i=1
+-while [ $i -le $match ]
+-do
+-pid=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep |
head -n $i | tail -n 1 | awk '{print $1}'`
+-pname=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep
| head -n $i | tail -n 1 | awk '{print $2}'`
+-if [ x"$1" != "xkill" ]
+-then
+-printf "$pid\t$pname\n"
+-else
+-kill $pid
+-fi
+-i=$(($i+1))
+-done
+-}
+-
+-checkProcessesIface() {
+-if [ x"$1" = "x" ]
+-then
+-return
+-fi
+-
+-match2=`ps -o comm= -p 1 2>&1 | grep $PS_ERROR | grep -v grep | wc
-l`
+-if [ $match2 -gt 0 ]
+-then
+-  return
+-fi
+-
+-for i in `ps auxw | grep $1 | grep -v "grep" | grep -v "airmon-ng"
| awk '{print $2}'`
+-do
+-pname=`ps -o comm= -p $i`
+-echo "Process with PID $i ($pname) is running on interface $1"
+-done
+-}
+-
+ getStack() {
+ if [ x"$1" = "x" ]
+ then
+@@ -505,22 +444,15 @@ iwpriv > /dev/null 2> /dev/null ||
+ 
+ if [ x"$1" = "xcheck" ] || [ x"$1" = "xstart" ]
+ then
+-scanProcesses
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|
WLAN)' | sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|
WLAN)' | sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+-# getModule $iface
+-# getDriver $iface
+-checkProcessesIface $iface
+-done
+ 
+-if [ x"$2" = "xkill" ]
+-then
+-scanProcesses "$2"
+-fi
+ if [ x"$1" = "xcheck" ]
+ then
+ exit
+ fi
++
++done
+ fi
+ 
+ printf "\n\n"
+@@ -605,7 +537,7 @@ then
+   sleep 1s
+ fi
+ 
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)'
| sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)'
| sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+  getModule  $iface
+  getDriver  $iface
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [CC] oldpackages: fix mdk3 build issue

2016-02-18 Thread Tomislav Požega
Create a patch that fixes an issue with mdk3 package that would break
build process when enabled with -Werror=format-security message. Closes
ticket https://dev.openwrt.org/ticket/20698

Signed-off-by: Tomislav Požega <pozega.tomis...@gmail.com>
---

diff -purN
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch 
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
---
a/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
1970-01-01 01:00:00.0 +0100
+++
b/feeds/packages/net/aircrack-ng/patches/001-airmon-ng_multi_bssid_fix.patch
2016-02-08 03:21:30.743649000 +0100
@@ -0,0 +1,105 @@
+--- a/scripts/airmon-ng2014-10-31 21:39:43.0 +0100
 b/scripts/airmon-ng2016-02-08 03:13:34.221319763 +0100
+@@ -101,67 +101,6 @@ getDriver() {
+ 
+ }
+ 
+-scanProcesses() {
+-if [ -f "`which service 2>&1`" ] && [ x"$1" = "xkill" ]
+-then
+-  service network-manager stop 2>/dev/null >/dev/null
+-  service avahi-daemon stop 2>/dev/null >/dev/null
+-fi
+-
+-match=`ps -A -o comm= | grep $PROCESSES | grep -v grep | wc -l`
+-if [ $match -gt 0 -a x"$1" != "xkill" ]
+-then
+-printf "\n\n"
+-echo "Found $match processes that could cause trouble."
+-echo "If airodump-ng, aireplay-ng or airtun-ng stops working
after"
+-echo "a short period of time, you may want to kill (some of)
them!"
+-echo -e "\nPID\tName"
+-else
+-if [ x"$1" != "xkill" ]
+-then
+-return
+-fi
+-fi
+-
+-if [ $match -gt 0 -a x"$1" = "xkill" ]
+-then
+-echo "Killing all those processes..."
+-fi
+-
+-i=1
+-while [ $i -le $match ]
+-do
+-pid=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep |
head -n $i | tail -n 1 | awk '{print $1}'`
+-pname=`ps -A -o pid= -o comm= | grep $PROCESSES | grep -v grep
| head -n $i | tail -n 1 | awk '{print $2}'`
+-if [ x"$1" != "xkill" ]
+-then
+-printf "$pid\t$pname\n"
+-else
+-kill $pid
+-fi
+-i=$(($i+1))
+-done
+-}
+-
+-checkProcessesIface() {
+-if [ x"$1" = "x" ]
+-then
+-return
+-fi
+-
+-match2=`ps -o comm= -p 1 2>&1 | grep $PS_ERROR | grep -v grep | wc
-l`
+-if [ $match2 -gt 0 ]
+-then
+-  return
+-fi
+-
+-for i in `ps auxw | grep $1 | grep -v "grep" | grep -v "airmon-ng"
| awk '{print $2}'`
+-do
+-pname=`ps -o comm= -p $i`
+-echo "Process with PID $i ($pname) is running on interface $1"
+-done
+-}
+-
+ getStack() {
+ if [ x"$1" = "x" ]
+ then
+@@ -505,22 +444,15 @@ iwpriv > /dev/null 2> /dev/null ||
+ 
+ if [ x"$1" = "xcheck" ] || [ x"$1" = "xstart" ]
+ then
+-scanProcesses
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|
WLAN)' | sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|
WLAN)' | sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+-# getModule $iface
+-# getDriver $iface
+-checkProcessesIface $iface
+-done
+ 
+-if [ x"$2" = "xkill" ]
+-then
+-scanProcesses "$2"
+-fi
+ if [ x"$1" = "xcheck" ]
+ then
+ exit
+ fi
++
++done
+ fi
+ 
+ printf "\n\n"
+@@ -605,7 +537,7 @@ then
+   sleep 1s
+ fi
+ 
+-for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)'
| sed 's/^\([a-zA-Z0-9_.]*\) .*/\1/' | grep -v wifi`
++for iface in `iwconfig 2>/dev/null | egrep '(IEEE|ESSID|802\.11|WLAN)'
| sed 's/^\([a-zA-Z0-9_-]*\) .*/\1/' | grep -v wifi`
+ do
+  getModule  $iface
+  getDriver  $iface
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [CC] ramips: update Xiaomi MiWiFi Mini .dts profile

2016-02-18 Thread Tomislav Požega
Update Xiaomi MiWiFi Mini .dts file with setting read-only flag to
u-boot partition and enabling PA to improve 2.4 GHz signal strength.

Signed-off-by: Tomislav Požega <pozega.tomis...@gmail.com>
---

diff -purN a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts
b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts
--- a/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts2016-02-11
18:15:49.813667000 +0100
+++ b/target/linux/ramips/dts/XIAOMI-MIWIFI-MINI.dts2016-02-12
05:50:09.713759990 +0100
@@ -37,6 +37,7 @@
partition@0 {
label = "u-boot";
reg = <0x0 0x3>;
+   read-only;
};
 
partition@3 {
@@ -113,6 +114,11 @@
ralink,group = "i2c", "rgmii1";
ralink,function = "gpio";
};
+
+   pa {
+   ralink,group = "pa";
+   ralink,function = "pa";
+   };
};
};
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [trunk] ar71xx: fix device names in GL-AR150 and GL-AR300 profiles

2016-02-18 Thread Tomislav Požega
Fix profile names for GL-AR150 and GL-AR300 devices.

Signed-off-by: Tomislav Požega <pozega.tomis...@gmail.com>
---

diff -pur a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh  2016-02-05
08:17:54.907348279 +0100
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh  2016-02-05
08:34:24.488186080 +0100
@@ -503,10 +503,10 @@ ar71xx_board_detect() {
name="gl-inet"
gl_inet_board_detect
;;
-   *"GL AR150")
+   *"GL-AR150")
name="gl-ar150"
;;
-   *"GL AR300")
+   *"GL-AR300")
name="gl-ar300"
;;
*"EnGenius EPG5000")
diff -pur a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
--- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
2016-02-05 08:25:30.205574118 +0100
+++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt
2016-02-05 08:33:47.392004734 +0100
@@ -547,7 +547,7 @@ config ATH79_MACH_EL_MINI
select ATH79_DEV_WMAC
 
 config ATH79_MACH_GL_AR150
-   bool "GL AR150 support"
+   bool "GL-AR150 support"
select SOC_AR933X
select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
@@ -557,7 +557,7 @@ config ATH79_MACH_GL_AR150
select ATH79_DEV_WMAC
 
 config ATH79_MACH_GL_AR300
-   bool "GL_AR300 support"
+   bool "GL-AR300 support"
select SOC_AR934X
select ATH79_DEV_ETH
select ATH79_DEV_GPIO_BUTTONS
diff -pur a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
2016-02-05 08:23:48.561077207 +0100
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
2016-02-05 08:30:56.807170793 +0100
@@ -122,4 +122,4 @@ static void __init gl_ar150_setup(void)
ath79_register_wmac(art + GL_AR150_CALDATA_OFFSET, art +
GL_AR150_WMAC_MAC_OFFSET);
 }
 
-MIPS_MACHINE(ATH79_MACH_GL_AR150, "GL-AR150", "GL
AR150",gl_ar150_setup);
+MIPS_MACHINE(ATH79_MACH_GL_AR150, "GL-AR150",
"GL-AR150",gl_ar150_setup);
diff -pur a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
2016-02-04 03:10:39.860872000 +0100
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar300.c
2016-02-05 08:35:30.844510514 +0100
@@ -100,4 +100,4 @@ static void __init gl_ar300_setup(void)
ath79_register_wmac(art + GL_AR300_CALDATA_OFFSET, art +
GL_AR300_WMAC_MAC_OFFSET);
 }
 
-MIPS_MACHINE(ATH79_MACH_GL_AR300, "GL-AR300", "GL
AR300",gl_ar300_setup);
+MIPS_MACHINE(ATH79_MACH_GL_AR300, "GL-AR300",
"GL-AR300",gl_ar300_setup);
diff -pur a/target/linux/ar71xx/generic/profiles/gli.mk
b/target/linux/ar71xx/generic/profiles/gli.mk
--- a/target/linux/ar71xx/generic/profiles/gli.mk   2016-02-05
08:20:46.872188948 +0100
+++ b/target/linux/ar71xx/generic/profiles/gli.mk   2016-02-05
08:32:23.759595824 +0100
@@ -16,23 +16,23 @@ endef
 $(eval $(call Profile,GLINET))
 
 define Profile/GL-AR150
-   NAME:=GL AR150
+   NAME:=GL-AR150
PACKAGES:=kmod-usb-core kmod-usb2
 endef
 
 define Profile/GL-AR150/Description
-   Configuration of GL AR150.
+   Configuration of GL-AR150.
 endef
 
 $(eval $(call Profile,GL-AR150))
 
 define Profile/GL-AR300
-   NAME:=GL AR300
+   NAME:=GL-AR300
PACKAGES:=kmod-usb-core kmod-usb2
 endef
 
 define Profile/GL-AR300/Description
-   Configuration of GL AR300.
+   Configuration of GL-AR300.
 endef
 
 $(eval $(call Profile,GL-AR300))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] [CC] ar71xx: add support for GL devices AR150/AR300/Domino Pi

2016-02-18 Thread Tomislav Požega
Add support for GL-AR150, GL-AR300 and GL-Domino Pi devices. Backported
from trunk, tested and working with GL-AR150.

Signed-off-by: Tomislav Požega <pozega.tomis...@gmail.com>
---

diff -purN a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds   2016-02-11
02:42:48.865611000 +0100
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds   2016-02-11
05:46:33.375507000 +0100
@@ -181,6 +181,18 @@ dlan-pro-1200-ac)
ucidef_set_led_trigger_gpio "plcr" "dLAN" "devolo:error:dlan" "16" "0"
;;
 
+gl-ar150)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar150:wlan" "phy0tpt"
+   ;;
+
+gl-ar300)
+   ucidef_set_led_wlan "wlan" "WLAN" "gl_ar300:wlan" "phy0tpt"
+   ;;
+
+gl-domino)
+   ucidef_set_led_wlan "wlan" "WLAN" "domino:wlan" "phy0tpt"
+   ;;
+
 gl-inet)
ucidef_set_led_netdev "lan" "LAN" "gl-connect:green:lan" "eth1"
ucidef_set_led_wlan "wlan" "WLAN" "gl-connect:red:wlan" "phy0tpt"
diff -purN a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
2016-02-11 02:42:48.865611000 +0100
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
2016-02-11 05:49:46.504451000 +0100
@@ -375,6 +375,14 @@ dir-505-a1)
 alfa-ap96 |\
 alfa-nx |\
 ap83 |\
+gl-ar150 |\
+gl-ar300)
+   ucidef_set_interfaces_lan_wan "eth1" "eth0"
+   ucidef_add_switch "switch0" "1" "1"
+   ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
+   ;;
+
+gl-domino |\
 gl-inet |\
 jwap003 |\
 pb42 |\
diff -purN a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh  2016-02-11
02:42:48.865611000 +0100
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh  2016-02-11
05:54:07.493727000 +0100
@@ -451,10 +451,19 @@ ar71xx_board_detect() {
*EL-MINI)
name="el-mini"
;;
+   *"GL-AR150")
+   name="gl-ar150"
+   ;;
+   *"GL-AR300")
+   name="gl-ar300"
+   ;;
*"GL-CONNECT INET v1")
name="gl-inet"
gl_inet_board_detect
;;
+   *"GL-Domino Pi")
+   name="gl-domino"
+   ;;
*"EnGenius EPG5000")
name="epg5000"
;;
diff -purN a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh2016-02-11
18:21:34.455354000 +0100
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh2016-02-12
05:08:58.865680625 +0100
@@ -249,6 +249,9 @@ platform_check_image() {
unifi | \
unifi-outdoor | \
carambola2 | \
+   gl-ar150 | \
+   gl-ar300 | \
+   gl-domino | \
weio )
[ "$magic" != "2705" ] && {
echo "Invalid image type."
diff -purN a/target/linux/ar71xx/config-3.18
b/target/linux/ar71xx/config-3.18
--- a/target/linux/ar71xx/config-3.18   2016-02-11 02:42:48.865611000
+0100
+++ b/target/linux/ar71xx/config-3.18   2016-02-11 05:56:43.890492000
+0100
@@ -68,6 +68,9 @@ CONFIG_ATH79_MACH_ESR1750=y
 CONFIG_ATH79_MACH_ESR900=y
 CONFIG_ATH79_MACH_EW_DORIN=y
 CONFIG_ATH79_MACH_F9K1115V2=y
+CONFIG_ATH79_MACH_GL_AR150=y
+CONFIG_ATH79_MACH_GL_AR300=y
+CONFIG_ATH79_MACH_GL_DOMINO=y
 CONFIG_ATH79_MACH_GL_INET=y
 CONFIG_ATH79_MACH_GS_MINIBOX_V1=y
 CONFIG_ATH79_MACH_GS_OOLITE=y
diff -purN a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
1970-01-01 01:00:00.0 +0100
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-gl-ar150.c
2016-02-11 09:19:07.86186 +0100
@@ -0,0 +1,125 @@
+/*
+ *  GL_ar150 board support
+ *
+ *  Copyright (C) 2011 dongyuqi <729650...@qq.com>
+ *  Copyright (C) 2011-2012 Gabor Juhos <juh...@openwrt.org>
+ *  Copyright (C) 2013 alzhao <alz...@gmail.com>
+ *  Copyright (C) 2014 Michel Stempin <michel.stem...@wanadoo.fr>
+ *
+ *  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 Fr

Re: [OpenWrt-Devel] Add a new Amazon-SE board

2013-10-17 Thread Tomislav Požega
thomson usually sticks with crappy broadcom so don't give much hope for
AR9271..


On 17 October 2013 09:33, Jacek Kikiewicz ja...@aol.pl wrote:

 Hi,

 First start with gainig console access...

 Then you need to check what boot loader is there.
 Depending on what it is your next steps will vary, let's hope it's
 supported one :)


 On 17.10.2013 11:16, Marco Antonio Mauro wrote:

 Hi everyone,

 I have a Thomson TG585v8 Amazon-SE device.

 The device seems almost identical to the Netgear DGN1000B already in
 openwrt, and I'd like to add support for the specific board. But can't
 seem to figure out how to do it. I previously added support for a
 ralink device but the process seems different here.

 The board has:

 - Lantiq PSB50601HL v1.2 Processor, supposedly clocked at 266MHz
 - Winbond W25Q64BV SPI flash, 8MBytes
 - Winbond W9825G6H SDRAM, 32MBytes total
 - Broadcom BCM5325E switch
 - USB2 wifi card for AP, can't remove the EMI shield to confirm model
 but probably Atheros AR9271
 - a couple buttons and leds.

 Can anyone give me some pointers on what to do?

 Thank you!

 PS: I'll add the device with the photos of the board to the wiki later

  __**_
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.**org openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/cgi-**bin/mailman/listinfo/openwrt-**develhttps://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


[OpenWrt-Devel] rt2800usb_entry_txstatus_timeout warnings prevent ralink USB adapters from functioning correctly in trunk

2013-08-14 Thread Tomislav Požega
as already described in ticket
https://dev.openwrt.org/ticket/13523rt2800usb driver does not function
properly in trunk revisions.

with default settings it is impossible to obtain stable throughput. the bug
is reported as still present in latest kernel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] rt2800usb_entry_txstatus_timeout warnings prevent ralink USB adapters from functioning correctly in trunk

2013-08-14 Thread Tomislav Požega
as already described in tickethttps://dev.openwrt.org/ticket/13523
https://dev.openwrt.org/ticket/13523rt2800usb
rt2800usb driver does not function properly in trunk revisions.

with default settings it is impossible to obtain stable throughput. the bug
is reported as still present in latest kernel
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] add suport for Option GlobeSurfer 3

2013-06-25 Thread Tomislav Požega
i have managed to boot the system further, but seems like the switch
detection is causing the problems.

i tried your netconfig patch but i'm getting the same scenario as with
Fiach's patch. when applied it i have only recompiled the firmware, please
tell me if it is neccessary to compile the whole thing from the start.

these error messages are only displayed when entered failsafe mode
https://docs.google.com/file/d/0B9q26mDpDIZoVFBfcm4wT3hFY28/edit

i can't access router from failsafe mode or get ping replies

when flashing image i always delete flash between CFE and NVRAM, do i need
to delete NVRAM also, and if i do it will the CFE rebuild it on the next
boot?


On 2 June 2013 06:01, Hauke Mehrtens ha...@hauke-m.de wrote:

 On 06/01/2013 11:56 PM, Tomislav Požega wrote:
  applied the patch and compiled everything from the start but no change
  in boot process

 This patch should not fix your boot problem, but you should try to use
 it instead of your changes to
 target/linux/brcm47xx/base-files/etc/init.d/netconfig

 For your boot problem your have to extend drivers/mtd/bcm47xxpart.c in
 the kernel to detect your flash partitions.

 Hauke

  On 1 June 2013 13:55, Hauke Mehrtens ha...@hauke-m.de
  mailto:ha...@hauke-m.de wrote:
 
  On 06/01/2013 06:24 PM, Tomislav Požega wrote:
   vlan0ports=5
   vlan1ports=0 1 2 3 4 5*
  
   i have zipped nvram, original firmware boot process and complete
 flash
   image in case you might find it useful
 
  Could you try the attached patch.
 
  Hauke
 
Index: target/linux/brcm47xx/base-files/etc/init.d/netconfig
   
  ===
--- target/linux/brcm47xx/base-files/etc/init.d/netconfig
   (revision
35832)
+++ target/linux/brcm47xx/base-files/etc/init.d/netconfig
(working copy)
@@ -225,6 +225,12 @@
 c[vlan1ports] = 
 c[vlan2ports] = 
 }
+if (model == Option GlobeSurfer III) {
+c[lan_ifname] = eth0.1
+c[wan_ifname] = 
+c[vlan1ports] = 0 1 2 3 4 5u
+c[vlan2ports] = 
+}
  
   I would more like a generic detection of this switch
  configuration.
   Could you please post your nvram values for vlan{0,1,2}ports.
  When these
   values are containing correct values we could do a generic
  detection.
  
 if (c[vlan1ports] || c[vlan2ports]) {
 print  VLAN configuration 
 
 


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


[OpenWrt-Devel] router inaccessible in failsafe mode!!

2013-06-23 Thread Tomislav Požega
cannot access router even in failsafe mode, most likely due to roboswitch
errors

someone else reported exact same problem here -
http://eko.one.pl/forum/viewtopic.php?id=6363

log file shows errors only when entering failsafe mode:

Press the [f] key and hit [enter] to enter failsafe mode
f
[8.056000] b44 ssb0:0: eth0: powering down PHY
[8.064000] roboswitch: failed to write mdio reg: 24 with err -22.
[8.072000] roboswitch: failed to write mdio reg: 16 with err -22.
[8.08] roboswitch: failed to write mdio reg: 17 with err -22.
[8.084000] roboswitch: failed to read mdio reg 17 with err -22.
[8.092000] roboswitch: failed to read mdio reg 17 with err -22.
[8.096000] roboswitch: failed to read mdio reg 17 with err -22.
[8.104000] roboswitch: timeout in robo_reg on page 52 and reg 16 with
op 1.
[8.112000] roboswitch: failed to write mdio reg: 24 with err -22.
[8.116000] roboswitch: failed to write mdio reg: 16 with err -22.
[8.124000] roboswitch: failed to write mdio reg: 17 with err -22.
[8.132000] roboswitch: failed to read mdio reg 17 with err -22.
[8.136000] roboswitch: failed to read mdio reg 17 with err -22.
[8.144000] roboswitch: failed to read mdio reg 17 with err -22.
[8.148000] roboswitch: timeout in robo_reg on page 52 and reg 18 with
op 1.
[8.156000] roboswitch: failed to write mdio reg: 24 with err -22.
[8.164000] roboswitch: failed to write mdio reg: 16 with err -22.
[8.172000] roboswitch: failed to write mdio reg: 17 with err -22.
[8.176000] roboswitch: failed to read mdio reg 17 with err -22.
[8.184000] roboswitch: failed to read mdio reg 17 with err -22.
[8.188000] roboswitch: failed to read mdio reg 17 with err -22.
[8.196000] roboswitch: timeout in robo_reg on page 52 and reg 20 with
op 1.
[8.204000] roboswitch: failed to write mdio reg: 24 with err -22.
[8.208000] roboswitch: failed to write mdio reg: 16 with err -22.
[8.216000] roboswitch: failed to write mdio reg: 17 with err -22.
[8.224000] roboswitch: failed to read mdio reg 17 with err -22.
[8.228000] roboswitch: failed to read mdio reg 17 with err -22.
[8.236000] roboswitch: failed to read mdio reg 17 with err -22.
[8.244000] roboswitch: timeout in robo_reg on page 52 and reg 22 with
op 1.
[8.248000] roboswitch: failed to write mdio reg: 24 with err -22.
[8.256000] roboswitch: failed to write mdio reg: 16 with err -22.
[8.264000] roboswitch: failed to write mdio reg: 17 with err -22.
[8.268000] roboswitch: failed to read mdio reg 17 with err -22.
[8.276000] roboswitch: failed to read mdio reg 17 with err -22.
[8.28] roboswitch: failed to read mdio reg 17 with err -22.
[8.288000] roboswitch: timeout in robo_reg on page 52 and reg 24 with
op 1.
[8.296000] roboswitch: failed to write mdio reg: 24 with err -22.
[8.304000] roboswitch: failed to write mdio reg: 16 with err -22.
[8.308000] roboswitch: failed to write mdio reg: 17 with err -22.
[8.316000] roboswitch: failed to read mdio reg 17 with err -22.
[8.32] roboswitch: failed to read mdio reg 17 with err -22.
[8.328000] roboswitch: failed to read mdio reg 17 with err -22.
[8.336000] roboswitch: timeout in robo_reg on page 52 and reg 26 with
op 1.
[8.34] roboswitch: failed to write mdio reg: 24 with err -22.
[8.348000] roboswitch: failed to write mdio reg: 25 with err -22.
[8.356000] roboswitch: failed to write mdio reg: 16 with err -22.
[8.36] roboswitch: failed to write mdio reg: 17 with err -22.
[8.368000] roboswitch: failed to read mdio reg 17 with err -22.
[8.376000] roboswitch: failed to read mdio reg 17 with err -22.
[8.38] roboswitch: failed to read mdio reg 17 with err -22.
[8.388000] roboswitch: timeout in robo_reg on page 52 and reg 8 with op
1.
[8.396000] roboswitch: failed to write mdio reg: 24 with err -22.
[8.40] roboswitch: failed to write mdio reg: 16 with err -22.
[8.408000] roboswitch: failed to write mdio reg: 17 with err -22.
[8.412000] roboswitch: failed to read mdio reg 17 with err -22.
[8.42] roboswitch: failed to read mdio reg 17 with err -22.
[8.428000] roboswitch: failed to read mdio reg 17 with err -22.
[8.432000] roboswitch: timeout in robo_reg on page 52 and reg 6 with op
1.
[8.484000] b44 ssb0:0: eth0: Link is up at 100 Mbps, full duplex
[8.488000] b44 ssb0:0: eth0: Flow control is off for TX and off for RX
- failsafe -
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] router inaccessible in failsafe mode!!

2013-06-23 Thread Tomislav Požega
it is Globesurfer 3, i am trying to run barrier breaker R36813, tried also
with R36922.

ifconfig command in normal boot mode returns only wlan0 interface, ifconfig
eth0 shows eth interface with RX bytes: 0 TX bytes: 5235

in failsafe mode ifconfig shows eth0 interface and the packet numbers are
counted when trying to ping or telnet router, but telnet returns no route
to host and ping returns destination host unreachable


On 23 June 2013 17:02, camden lindsay camden.lindsay+open...@gmail.comwrote:

 What device is this?
 What version of OpenWRT are you running?

 There is a bug open here: https://dev.openwrt.org/ticket/7502



 On Sun, Jun 23, 2013 at 1:08 PM, Tomislav Požega 
 pozega.tomis...@gmail.com wrote:

 cannot access router even in failsafe mode, most likely due to roboswitch
 errors

 someone else reported exact same problem here -
 http://eko.one.pl/forum/viewtopic.php?id=6363

 log file shows errors only when entering failsafe mode:

 Press the [f] key and hit [enter] to enter failsafe mode
 f
 [8.056000] b44 ssb0:0: eth0: powering down PHY
 [8.064000] roboswitch: failed to write mdio reg: 24 with err -22.
 [8.072000] roboswitch: failed to write mdio reg: 16 with err -22.
 [8.08] roboswitch: failed to write mdio reg: 17 with err -22.
 [8.084000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.092000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.096000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.104000] roboswitch: timeout in robo_reg on page 52 and reg 16 with
 op 1.
 [8.112000] roboswitch: failed to write mdio reg: 24 with err -22.
 [8.116000] roboswitch: failed to write mdio reg: 16 with err -22.
 [8.124000] roboswitch: failed to write mdio reg: 17 with err -22.
 [8.132000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.136000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.144000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.148000] roboswitch: timeout in robo_reg on page 52 and reg 18 with
 op 1.
 [8.156000] roboswitch: failed to write mdio reg: 24 with err -22.
 [8.164000] roboswitch: failed to write mdio reg: 16 with err -22.
 [8.172000] roboswitch: failed to write mdio reg: 17 with err -22.
 [8.176000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.184000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.188000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.196000] roboswitch: timeout in robo_reg on page 52 and reg 20 with
 op 1.
 [8.204000] roboswitch: failed to write mdio reg: 24 with err -22.
 [8.208000] roboswitch: failed to write mdio reg: 16 with err -22.
 [8.216000] roboswitch: failed to write mdio reg: 17 with err -22.
 [8.224000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.228000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.236000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.244000] roboswitch: timeout in robo_reg on page 52 and reg 22 with
 op 1.
 [8.248000] roboswitch: failed to write mdio reg: 24 with err -22.
 [8.256000] roboswitch: failed to write mdio reg: 16 with err -22.
 [8.264000] roboswitch: failed to write mdio reg: 17 with err -22.
 [8.268000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.276000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.28] roboswitch: failed to read mdio reg 17 with err -22.
 [8.288000] roboswitch: timeout in robo_reg on page 52 and reg 24 with
 op 1.
 [8.296000] roboswitch: failed to write mdio reg: 24 with err -22.
 [8.304000] roboswitch: failed to write mdio reg: 16 with err -22.
 [8.308000] roboswitch: failed to write mdio reg: 17 with err -22.
 [8.316000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.32] roboswitch: failed to read mdio reg 17 with err -22.
 [8.328000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.336000] roboswitch: timeout in robo_reg on page 52 and reg 26 with
 op 1.
 [8.34] roboswitch: failed to write mdio reg: 24 with err -22.
 [8.348000] roboswitch: failed to write mdio reg: 25 with err -22.
 [8.356000] roboswitch: failed to write mdio reg: 16 with err -22.
 [8.36] roboswitch: failed to write mdio reg: 17 with err -22.
 [8.368000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.376000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.38] roboswitch: failed to read mdio reg 17 with err -22.
 [8.388000] roboswitch: timeout in robo_reg on page 52 and reg 8 with
 op 1.
 [8.396000] roboswitch: failed to write mdio reg: 24 with err -22.
 [8.40] roboswitch: failed to write mdio reg: 16 with err -22.
 [8.408000] roboswitch: failed to write mdio reg: 17 with err -22.
 [8.412000] roboswitch: failed to read mdio reg 17 with err -22.
 [8.42] roboswitch: failed to read mdio reg 17

[OpenWrt-Devel] JFFS2 errors - how to fix ?

2013-06-09 Thread Tomislav Požega
brcm47xx platform with BCM5354, BARRIER BREAKER (Bleeding Edge, r36813)

i'm getting these jffs2 errors at each boot as well as system read-only
(doesn't allow to change passwd etc.)

Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
[ 10.328000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x0094: 0xadde instead
[ 10.336000] jffs2: Empty flash at 0x0098 ends at 0x1094
[ 10.344000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x1094: 0xadde instead
[ 10.356000] jffs2: Empty flash at 0x1098 ends at 0x2094
[ 10.36] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x2094: 0xadde instead
[ 10.38] jffs2: Empty flash at 0x2098 ends at 0x00010094
[ 10.388000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00010094: 0xadde instead
[ 10.408000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00020094: 0xadde instead
[ 10.444000] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found
at 0x00040094: 0xadde instead
[ 19.688000] jffs2: Cowardly refusing to erase blocks on filesystem with no
valid JFFS2 nodes
[ 19.696000] jffs2: empty_blocks 0, bad_blocks 0, c-nr_blocks 192
switching to jffs2
- init -

at this time i can only suspect it has something to do with TRX offset
which is 94 in size.

boot log: https://docs.google.com/file/d/0B9q26mDpDIZoYU5ZbncxT0I4TGs/edit
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] VFS: Cannot open root device (null) or unknown-block(0, 0): error -6

2013-06-02 Thread Tomislav Požega
in file
/home/u1204/openwrt/trunk/build_dir/target-mipsel_uClibc-0.9.33.2/linux-brcm47xx/linux-3.8.13/drivers/mtd/bcm47xxpart.c
at line 111 variable board_data is used, but this board doesn't have a
board_id.

regarding flash detection, if partition parser did not find root partition,
that means the kernel does not recognize the partition it's booting from?
or am i wrong? how to fix that, it is samsung K8P5516UZB-EI4E 32MB flash
chip, but due to it's flash layout only 8MB are useful for booting an image.


On 1 June 2013 10:34, Hauke Mehrtens ha...@hauke-m.de wrote:

 On 06/01/2013 04:23 PM, Tomislav Požega wrote:
  compiled an image with patches included in my previous message, flashed
  the device and got kernel panic and errors in log file
 
  i'm not sure how to proceed further with this
 
 
 
   Decompressing.done
 
 
  CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
  Build Date: Tue Apr 28 09:59:43 CEST 2009 (jan@raptor)
  Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.
 
  Initializing Arena
  Initializing Devices.
  et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 4.150.10.24
  CPU type 0x29029: 240MHz
  Total memory: 32768 KBytes
 
  Total memory used by CFE:  0x8070 - 0x807B2DC0 (732608)
  Initialized Data:  0x80730AA0 - 0x8074C590 (113392)
  BSS Area:  0x8074C590 - 0x8074CDC0 (2096)
  Local Heap:0x8074CDC0 - 0x807B0DC0 (409600)
  Stack Area:0x807B0DC0 - 0x807B2DC0 (8192)
  Text (code) segment:   0x8070 - 0x80730AA0 (199328)
  Boot area (physical):  0x007B3000 - 0x007F3000
  Relocation Factor: I: - D:
 
  Device eth0:  hwaddr 00-0C-E3-68-38-02, ipaddr 192.168.1.1, mask
  255.255.255.0
  gateway not set, nameserver not set
  Loader:raw Filesys:raw Dev:flash0.os0 File: Options:(null)
  RG offset = bc04
  Loading: .. 3836 bytes read
  Entry at 0x80001000
  Closing network.
  Starting program at 0x80001000
  [0.00] Linux version 3.8.13 (u1204@ubuntu) (gcc version 4.6.4
  (OpenWrt/Linaro GCC 4.6-2012.12 r36813) ) #6 Sat Jun 1 03:28:03 EDT 2013
 
  [0.456000] Amd/Fujitsu Extended Query Table at 0x0040
  [0.464000]   Amd/Fujitsu Extended Query version 1.3.
  [0.468000] number of CFI chips: 1
  [0.528000] 2 bcm47xxpart partitions found on MTD device
 physmap-flash.0
  [0.532000] Creating 2 MTD partitions on physmap-flash.0:
  [0.54] 0x-0x01fe : boot
  [0.552000] 0x01fe-0x0200 : nvram

 The partition parser did not found any root partition, then it can not
 mount any root partition. Have a look at drivers/mtd/bcm47xxpart.c.

  [0.568000] bcm47xx-wdt bcm47xx-wdt.0: BCM47xx Watchdog Timer enabled
  (30 seconds, Software Timer)
  [0.58] TCP: cubic registered
  [0.584000] NET: Registered protocol family 17
  [0.588000] Bridge firewalling registered
  [0.592000] 8021q: 802.1Q VLAN Support v1.8
  [0.604000] VFS: Cannot open root device (null) or
  unknown-block(0,0): error -6
  [0.612000] Please append a correct root= boot option; here are the
  available partitions:
  [0.62] 1f00   32640 mtdblock0  (driver?)
  [0.624000] 1f01 128 mtdblock1  (driver?)
  [0.628000] Kernel panic - not syncing: VFS: Unable to mount root fs
  on unknown-block(0,0)
 


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


[OpenWrt-Devel] [PATCH] add suport for Option GlobeSurfer 3

2013-06-01 Thread Tomislav Požega
these patches are slight modification of Fiach Antaw's original
gs2_support.diff he used to successfully port GlobeSurfer 2

i have changed boardtype and boardrev variables to the ones of globesurfer3.

Index: target/linux/brcm47xx/image/lzma-loader/src/decompress.c
===
--- target/linux/brcm47xx/image/lzma-loader/src/decompress.c(revision
35832)
+++ target/linux/brcm47xx/image/lzma-loader/src/decompress.c(working
copy)
@@ -90,6 +90,9 @@
 #define EDIMAX_PS_HEADER_MAGIC0x36315350 /*  PS16  */
 #define EDIMAX_PS_HEADER_LEN0xc /* 12 bytes long for edimax header */

+#define OPENRG_HEADER_MAGIC 0xBEBAEDFE /* 'FEEDBABE' */
+#define OPENRG_HEADER_LEN   0x94
+
 /* beyound the image end, size not known in advance */
 extern unsigned char workspace[];

@@ -139,11 +142,14 @@
 /* look for trx header, 32-bit data access */
 for (data = ((unsigned char *) KSEG1ADDR(BCM4710_FLASH));
 ((struct trx_header *)data)-magic != TRX_MAGIC 
-((struct trx_header *)data)-magic != EDIMAX_PS_HEADER_MAGIC;
+((struct trx_header *)data)-magic != EDIMAX_PS_HEADER_MAGIC 
+((struct trx_header *)data)-magic != OPENRG_HEADER_MAGIC;
  data += 65536);

 if (((struct trx_header *)data)-magic == EDIMAX_PS_HEADER_MAGIC)
 data += EDIMAX_PS_HEADER_LEN;
+if (((struct trx_header *)data)-magic == OPENRG_HEADER_MAGIC)
+data += OPENRG_HEADER_LEN;
 /* compressed kernel is in the partition 0 or 1 */
 if (((struct trx_header *)data)-offsets[1]  65536)
 data += ((struct trx_header *)data)-offsets[0];
Index: target/linux/brcm47xx/base-files/etc/init.d/netconfig
===
--- target/linux/brcm47xx/base-files/etc/init.d/netconfig(revision
35832)
+++ target/linux/brcm47xx/base-files/etc/init.d/netconfig(working copy)
@@ -225,6 +225,12 @@
 c[vlan1ports] = 
 c[vlan2ports] = 
 }
+if (model == Option GlobeSurfer III) {
+c[lan_ifname] = eth0.1
+c[wan_ifname] = 
+c[vlan1ports] = 0 1 2 3 4 5u
+c[vlan2ports] = 
+}

 if (c[vlan1ports] || c[vlan2ports]) {
 print  VLAN configuration 
Index:
target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
===
---
target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
(revision 35832)
+++
target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
(working copy)
@@ -8,7 +8,7 @@
  obj-$(CONFIG_BCM47XX_SSB)+= wgt634u.o
 --- /dev/null
 +++ b/arch/mips/bcm47xx/board.c
-@@ -0,0 +1,223 @@
+@@ -0,0 +1,236 @@
 +#include linux/export.h
 +#include linux/string.h
 +#include bcm47xx_board.h
@@ -127,6 +127,11 @@
 +{ {0}, 0},
 +};
 +
++static const struct bcm47xx_board_type_list
bcm47xx_board_list_board_type_rev[] = {
++{{BCM47XX_BOARD_OPTION_GS3, Option GlobeSurfer III},
0x048e,0x10},
++{ {0}, 0},
++};
++
 +static const struct bcm47xx_board_type bcm47xx_board_unknown[] = {
 +{BCM47XX_BOARD_UNKNOWN, Unknown Board},
 +};
@@ -200,6 +205,14 @@
 +return e-board;
 +}
 +}
++
++if (bcm47xx_nvram_getenv(boardtype, buf1, sizeof(buf1)) = 0 
++bcm47xx_nvram_getenv(boardrev, buf2, sizeof(buf2)) = 0) {
++for (e = bcm47xx_board_list_board_type_rev; e-value1; e++) {
++if (!strcmp(buf1, e-value1)  !strcmp(buf2, e-value2))
++return e-board;
++}
++}
 +return bcm47xx_board_unknown;
 +}
 +
@@ -234,7 +247,7 @@
 +EXPORT_SYMBOL(bcm47xx_board_get_name);
 --- /dev/null
 +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
-@@ -0,0 +1,91 @@
+@@ -0,0 +1,93 @@
 +#ifndef __BCM47XX_BOARD_H
 +#define __BCM47XX_BOARD_H
 +
@@ -315,6 +328,8 @@
 +BCM47XX_BOARD_NETGEAR_WNR3500V2VC,
 +BCM47XX_BOARD_NETGEAR_WNR834BV2,
 +
++BCM47XX_BOARD_OPTION_GS3,
++
 +/* TODO */
 +BCM47XX_BOARD_SIMPLETECH_SIMPLESHARE,
 +
Index:
target/linux/brcm47xx/patches-3.6/050-mtd-add-bcm47xx-part-parser.patch
===
---
target/linux/brcm47xx/patches-3.6/050-mtd-add-bcm47xx-part-parser.patch
(revision 35832)
+++
target/linux/brcm47xx/patches-3.6/050-mtd-add-bcm47xx-part-parser.patch
(working copy)
@@ -26,7 +26,7 @@
  obj-$(CONFIG_MTD_CHAR)+= mtdchar.o
 --- /dev/null
 +++ b/drivers/mtd/bcm47xxpart.c
-@@ -0,0 +1,504 @@
+@@ -0,0 +1,560 @@
 +/*
 + *  Copyright (C) 2006 Felix Fietkau n...@openwrt.org
 + *  Copyright (C) 2005 Waldemar Brodkorb w...@openwrt.org
@@ -106,6 +106,24 @@
 +#define EDIMAX_PS_HEADER_MAGIC0x36315350 /*  PS16  */
 +#define EDIMAX_PS_HEADER_LEN0xc /* 12 bytes long for edimax header */
 +
++/* similarly, OpenRG-based boards use additional headers
++ * as part of their flash partitioning scheme,
++ * which 

[OpenWrt-Devel] VFS: Cannot open root device (null) or unknown-block(0, 0): error -6

2013-06-01 Thread Tomislav Požega
compiled an image with patches included in my previous message, flashed the
device and got kernel panic and errors in log file

i'm not sure how to proceed further with this



 Decompressing.done


CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: Tue Apr 28 09:59:43 CEST 2009 (jan@raptor)
Copyright (C) 2000,2001,2002,2003 Broadcom Corporation.

Initializing Arena
Initializing Devices.
et0: Broadcom BCM47xx 10/100 Mbps Ethernet Controller 4.150.10.24
CPU type 0x29029: 240MHz
Total memory: 32768 KBytes

Total memory used by CFE:  0x8070 - 0x807B2DC0 (732608)
Initialized Data:  0x80730AA0 - 0x8074C590 (113392)
BSS Area:  0x8074C590 - 0x8074CDC0 (2096)
Local Heap:0x8074CDC0 - 0x807B0DC0 (409600)
Stack Area:0x807B0DC0 - 0x807B2DC0 (8192)
Text (code) segment:   0x8070 - 0x80730AA0 (199328)
Boot area (physical):  0x007B3000 - 0x007F3000
Relocation Factor: I: - D:

Device eth0:  hwaddr 00-0C-E3-68-38-02, ipaddr 192.168.1.1, mask
255.255.255.0
gateway not set, nameserver not set
Loader:raw Filesys:raw Dev:flash0.os0 File: Options:(null)
RG offset = bc04
Loading: .. 3836 bytes read
Entry at 0x80001000
Closing network.
Starting program at 0x80001000
[0.00] Linux version 3.8.13 (u1204@ubuntu) (gcc version 4.6.4
(OpenWrt/Linaro GCC 4.6-2012.12 r36813) ) #6 Sat Jun 1 03:28:03 EDT 2013
[0.00] CPU revision is: 00029029 (Broadcom BMIPS3300)
[0.00] bcm47xx: using ssb bus
[0.00] ssb: Found chip with id 0x5354, rev 0x03 and package 0x00
[0.00] Couldn't find supported flash memory
[0.00] can not parse nvram name (null)rxpo2g(null) with value
0xfff8 got -34
[0.00] ssb: Sonics Silicon Backplane found at address 0x1800
[0.00] Determined physical RAM map:
[0.00]  memory: 0200 @  (usable)
[0.00] Initrd not found or empty - disabling initrd
[0.00] Zone ranges:
[0.00]   Normal   [mem 0x-0x01ff]
[0.00] Movable zone start for each node
[0.00] Early memory node ranges
[0.00]   node   0: [mem 0x-0x01ff]
[0.00] Primary instruction cache 16kB, VIPT, 4-way, linesize 16
bytes.
[0.00] Primary data cache 16kB, 2-way, VIPT, cache aliases,
linesize 16 bytes
[0.00] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 8128
[0.00] Kernel command line:  noinitrd console=ttyS0,115200
[0.00] PID hash table entries: 128 (order: -3, 512 bytes)
[0.00] Dentry cache hash table entries: 4096 (order: 2, 16384
bytes)
[0.00] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] __ex_table already sorted, skipping sort
[0.00] Memory: 29068k/32768k available (2394k kernel code, 3700k
reserved, 557k data, 180k init, 0k highmem)
[0.00] NR_IRQS:128
[0.00] console [ttyS0] enabled
[0.088000] Calibrating delay loop... 239.10 BogoMIPS (lpj=478208)
[0.12] pid_max: default: 32768 minimum: 301
[0.124000] Mount-cache hash table entries: 512
[0.132000] NET: Registered protocol family 16
[0.176000] bio: create slab bio-0 at 0
[0.188000] Switching to clocksource MIPS
[0.216000] NET: Registered protocol family 2
[0.224000] TCP established hash table entries: 512 (order: 0, 4096
bytes)
[0.232000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[0.24] TCP: Hash tables configured (established 512 bind 512)
[0.244000] TCP: reno registered
[0.248000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[0.256000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[0.264000] NET: Registered protocol family 1
[0.276000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[0.284000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME)
(CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[0.292000] msgmni has been set to 56
[0.30] io scheduler noop registered
[0.304000] io scheduler deadline registered (default)
[0.308000] Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
[0.336000] serial8250: ttyS0 at MMIO 0xb8000300 (irq = 3) is a
U6_16550A
[0.368000] serial8250: ttyS1 at MMIO 0xb8000400 (irq = 3) is a
U6_16550A
[0.396000] serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3) is a
U6_16550A
[0.424000] serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3) is a
U6_16550A
[0.44] physmap platform flash device: 0201 at 1c00
[0.448000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank.
Manufacturer ID 0xec Chip ID 0x00227e
[0.456000] Amd/Fujitsu Extended Query Table at 0x0040
[0.464000]   Amd/Fujitsu Extended Query version 1.3.
[0.468000] number of CFI chips: 1
[0.528000] 2 bcm47xxpart partitions found on MTD device physmap-flash.0
[0.532000] Creating 2 MTD partitions on physmap-flash.0:
[0.54] 0x-0x01fe : 

Re: [OpenWrt-Devel] [PATCH] add suport for Option GlobeSurfer 3

2013-06-01 Thread Tomislav Požega
vlan0ports=5
vlan1ports=0 1 2 3 4 5*

i have zipped nvram, original firmware boot process and complete flash
image in case you might find it useful

http://www25.zippyshare.com/v/34134998/file.html


On 1 June 2013 10:32, Hauke Mehrtens ha...@hauke-m.de wrote:

 On 06/01/2013 04:11 PM, Tomislav Požega wrote:
  these patches are slight modification of Fiach Antaw's original
  gs2_support.diff he used to successfully port GlobeSurfer 2
 
  i have changed boardtype and boardrev variables to the ones of
 globesurfer3.

 Your patch is whitespace damaged, the tabs are replaced with white
 spaces. Please follow https://dev.openwrt.org/wiki/SubmittingPatches

 Could you base your patch only on kernel 3.8, I will not do any changes
 for kernel 3.6 any more.

  Index: target/linux/brcm47xx/image/lzma-loader/src/decompress.c
  ===
  --- target/linux/brcm47xx/image/lzma-loader/src/decompress.c
  (revision 35832)
  +++ target/linux/brcm47xx/image/lzma-loader/src/decompress.c(working
  copy)
  @@ -90,6 +90,9 @@
   #define EDIMAX_PS_HEADER_MAGIC0x36315350 /*  PS16  */
   #define EDIMAX_PS_HEADER_LEN0xc /* 12 bytes long for edimax header
 */
 
  +#define OPENRG_HEADER_MAGIC 0xBEBAEDFE /* 'FEEDBABE' */
  +#define OPENRG_HEADER_LEN   0x94
  +
   /* beyound the image end, size not known in advance */
   extern unsigned char workspace[];
 
  @@ -139,11 +142,14 @@
   /* look for trx header, 32-bit data access */
   for (data = ((unsigned char *) KSEG1ADDR(BCM4710_FLASH));
   ((struct trx_header *)data)-magic != TRX_MAGIC 
  -((struct trx_header *)data)-magic != EDIMAX_PS_HEADER_MAGIC;
  +((struct trx_header *)data)-magic != EDIMAX_PS_HEADER_MAGIC 
  +((struct trx_header *)data)-magic != OPENRG_HEADER_MAGIC;
data += 65536);
 
   if (((struct trx_header *)data)-magic == EDIMAX_PS_HEADER_MAGIC)
   data += EDIMAX_PS_HEADER_LEN;
  +if (((struct trx_header *)data)-magic == OPENRG_HEADER_MAGIC)
  +data += OPENRG_HEADER_LEN;
   /* compressed kernel is in the partition 0 or 1 */
   if (((struct trx_header *)data)-offsets[1]  65536)
   data += ((struct trx_header *)data)-offsets[0];
  Index: target/linux/brcm47xx/base-files/etc/init.d/netconfig
  ===
  --- target/linux/brcm47xx/base-files/etc/init.d/netconfig(revision
  35832)
  +++ target/linux/brcm47xx/base-files/etc/init.d/netconfig(working
 copy)
  @@ -225,6 +225,12 @@
   c[vlan1ports] = 
   c[vlan2ports] = 
   }
  +if (model == Option GlobeSurfer III) {
  +c[lan_ifname] = eth0.1
  +c[wan_ifname] = 
  +c[vlan1ports] = 0 1 2 3 4 5u
  +c[vlan2ports] = 
  +}

 I would more like a generic detection of this switch configuration.
 Could you please post your nvram values for vlan{0,1,2}ports. When these
 values are containing correct values we could do a generic detection.

   if (c[vlan1ports] || c[vlan2ports]) {
   print  VLAN configuration 
  Index:
 
 target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
  ===
  ---
 
 target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
  (revision 35832)
  +++
 
 target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch
  (working copy)
  @@ -8,7 +8,7 @@
obj-$(CONFIG_BCM47XX_SSB)+= wgt634u.o
   --- /dev/null
   +++ b/arch/mips/bcm47xx/board.c
  -@@ -0,0 +1,223 @@
  +@@ -0,0 +1,236 @@
   +#include linux/export.h
   +#include linux/string.h
   +#include bcm47xx_board.h
  @@ -127,6 +127,11 @@
   +{ {0}, 0},
   +};
   +
  ++static const struct bcm47xx_board_type_list
  bcm47xx_board_list_board_type_rev[] = {
  ++{{BCM47XX_BOARD_OPTION_GS3, Option GlobeSurfer III},
  0x048e,0x10},
  ++{ {0}, 0},
  ++};
  ++
   +static const struct bcm47xx_board_type bcm47xx_board_unknown[] = {
   +{BCM47XX_BOARD_UNKNOWN, Unknown Board},
   +};
  @@ -200,6 +205,14 @@
   +return e-board;
   +}
   +}
  ++
  ++if (bcm47xx_nvram_getenv(boardtype, buf1, sizeof(buf1)) = 0 
  ++bcm47xx_nvram_getenv(boardrev, buf2, sizeof(buf2)) = 0) {
  ++for (e = bcm47xx_board_list_board_type_rev; e-value1; e++) {
  ++if (!strcmp(buf1, e-value1)  !strcmp(buf2, e-value2))
  ++return e-board;
  ++}
  ++}
   +return bcm47xx_board_unknown;
   +}
   +
  @@ -234,7 +247,7 @@
   +EXPORT_SYMBOL(bcm47xx_board_get_name);
   --- /dev/null
   +++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx_board.h
  -@@ -0,0 +1,91 @@
  +@@ -0,0 +1,93 @@
   +#ifndef __BCM47XX_BOARD_H
   +#define __BCM47XX_BOARD_H
   +
  @@ -315,6 +328,8 @@
   +BCM47XX_BOARD_NETGEAR_WNR3500V2VC,
   +BCM47XX_BOARD_NETGEAR_WNR834BV2