[OpenWrt-Devel] mt7620n failed message

2014-11-24 Thread zhang zhao
I'm using a 7620n router(openwrt BB14.07  r43276) with a secondary SSID
enabled, after running for sometime I found these trace information in
system log. I remember there is already a ticket
https://dev.openwrt.org/ticket/17032 , I wonder if these two problems was
caused by a same reason?

Here is the error log:
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.35] [ cut
here ]
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.36] WARNING: at
net/core/dev.c:2194 skb_warn_bad_offload+0xbc/0xe4()
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.37] rt2800_wmac:
caps=(0x6000, 0x) len=117 data_len=0
gso_size=51 gso_type=0 ip_summed=3
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.39] Modules linked
in: rt2800soc rt2800mmio rt2800lib pppoe ppp_async iptable_nat rt2x00soc
rt2x00mmio rt2x00lib pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv4
mac80211 ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat
xt_multiport xt_mark xt_mac xt_limit xt_id xt_conntrack xt_comment
xt_TCPMSS xt_REDIRECT xt_LOG xt_CT slhc nf_nat_irc nf_nat_ftp nf_nat
nf_defrag_ipv4 nf_conntrack_irc nf_conntrack_ftp iptable_raw iptable_mangle
iptable_filter ipMon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.53]
CPU: 0 PID: 0 Comm: swapper Tainted: GW3.10.49 #4
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.54] Stack : 
   8031a35e 003d 802b6260 83246e18
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.54] 80276544
802b668b  8031381c 802b6260 83246e18  
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.54] 0001
80222e44 0003 801883a4 8028c148 83246e18 80277c04 802ab9e4
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.54] 
      
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.54] 
      802ab970
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.54] ...
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.62] Call Trace:
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.62] [801c6848]
show_stack+0x48/0x70
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.63] [80233b24]
warn_slowpath_common+0x78/0xa8
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.64] [80233b80]
warn_slowpath_fmt+0x2c/0x38
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.65] [80223528]
skb_warn_bad_offload+0xbc/0xe4
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.66] [801cf398]
skb_checksum_help+0x40/0x1c0
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.67] [8009e4d8]
dev_hard_start_xmit+0x2cc/0x470
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.68] [801afec0]
sch_direct_xmit+0x60/0x254
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.69] [8009fa54]
dev_queue_xmit+0x258/0x494
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.70] [80072a20]
br_dev_queue_push_xmit+0x6c/0x80
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.71] [80072df4]
br_dev_xmit+0x1cc/0x200
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.72] [8009e4f8]
dev_hard_start_xmit+0x2ec/0x470
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.73] [8009fbc4]
dev_queue_xmit+0x3c8/0x494
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.74] [80109638]
ip_finish_output+0x398/0x42c
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.75] [800414cc]
__netif_receive_skb_core+0x5ac/0x6a4
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.76] [8013c0a0]
lro_flush+0x170/0x1b8
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.77] [8013c12c]
lro_flush_all+0x44/0x64
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.78] [800cc0d4]
fe_poll_rx+0x2a0/0x314
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.79] [80159214]
net_rx_action+0x10c/0x1e0
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.80] [8003035c]
__do_softirq+0xd0/0x1bc
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.81] [800b84b0]
do_softirq+0x48/0x68
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.82] [801174cc]
irq_exit+0x54/0x70
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.82] [80004830]
ret_from_irq+0x0/0x4
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.83] [80199fec]
r4k_wait_irqoff+0x18/0x1c
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.84] [80090d60]
cpu_startup_entry+0xa4/0x104
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.85] [802c7910]
start_kernel+0x38c/0x3a4
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.86]
Mon Nov 24 07:25:31 2014 kern.warn kernel: [ 2810.87] ---[ end trace
6faa69b048fb57b1 ]---
Mon Nov 24 07:25:42 2014 kern.warn kernel: [ 2821.70] [ cut
here ]
Mon Nov 24 07:25:42 2014 kern.warn kernel: [ 2821.71] WARNING: at
net/core/dev.c:2194 skb_warn_bad_offload+0xbc/0xe4()
Mon Nov 24 07:25:42 2014 kern.warn kernel: [ 2821.72] 

Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-11-24 Thread Heiner Kallweit
On Mon, Nov 24, 2014 at 1:06 AM, Felix Fietkau n...@openwrt.org wrote:

 On 2014-11-23 23:03, Weedy wrote:
 
  On Nov 23, 2014 4:35 PM, Weedy weedy2...@gmail.com
  mailto:weedy2...@gmail.com wrote:
 
 
  On Nov 19, 2014 8:47 AM, John Crispin blo...@openwrt.org
  mailto:blo...@openwrt.org wrote:
  
  
  
   On 19/11/2014 14:44, Weedy wrote:
   
On Oct 30, 2014 5:08 PM, Heiner Kallweit hkallwe...@gmail.com
  mailto:hkallwe...@gmail.com
mailto:hkallwe...@gmail.com mailto:hkallwe...@gmail.com wrote:
   
Am 30.10.2014 um 07:22 schrieb Heiner Kallweit:
 Am 30.10.2014 um 03:36 schrieb Florian Fainelli:
 Le 28/10/2014 11:46, Heiner Kallweit a écrit :
 After a little more thinking about it and looking at the code I
basically have two questions:

 1.
 Is it actually needed to exclude certain phy's in
ar8xxx_phy_config_aneg?
 (At least for AR8327 it doesn't get called with an addr != 0
  anyway)
 Else we could remove ar8xxx_phy_config_aneg and directly
 register
genphy_config_aneg as
 callback for autoneg configuration.

 Address 0 is special, since this is a MDIO broadcast address
 that
will usually be handled by switches as write to all front-panel
  ports.


 2.
 Call sequence with regard to ar8216 is:
 ar8216: ar8xxx_phy_probe
 phy: phy_attach_direct
 phy: phy_init_hw
 ar8216: ar8xxx_phy_config_init
 ar8216: ar8xxx_phy_config_aneg

 ar8216 driver handles AR8327/AR8337 different from the other
supported switch types.
 ar8xxx_start incl. more detailed configuration is called from
ar8xxx_phy_probe already.
 For the other switch types it's called from
  ar8xxx_phy_config_init.

 I wonder whether doing detailed configuration in the probe
 stage
might be too early.
 phy_init_hw resets the switch anyway later.
 Doing the detailed setup in ar8xxx_phy_config_init seems to be
more suited however
 there might be good reason why it's handled the way it is.

 I suppose that you could re-advertise auto-negotiation by
 calling
genphy_config_advert() in the config_init routine.

 The actual problem is caused by BMCR_ANENABLE being cleared by
 the
reset in phy_init_hw.
 As far as I can see genphy_config_advert doesn't bring back
  this flag.
 What does genphy_config_aneg mainly do?
   - call genphy_config_advert
   - check if BMCR_ANENABLE is set
   - if it's not, call genphy_restart_aneg
 Therefore, to bring back BMCR_ANENABLE, we have to call
genphy_config_aneg or genphy_restart_aneg.
 genphy_restart_aneg most likely is sufficient, however I don't
 see
that genphy_config_aneg
 can do any harm if being called with addr == 0.
 At least for me it works perfectly fine to call
 genphy_config_aneg
for all addr's.

 Rgds, Heiner



 Rgds,
 Heiner


 Am 27.10.2014 um 22:00 schrieb Heiner Kallweit:
 With two different TPLINK routers (both with a AR8327N
 switch) I
faced the issue that with
 kernel 3.14 certain switch ports used 10MBit/half only.
 Under kernel 3.10 everything was fine and the same ports used
1000MBit/full.

 As the ar8216 driver is the same I had a look at the common
 phy
code in drivers/net/phy.
 In function phy_init_hw in phy_device.c kernel 3.14 resets the
phy whilst 3.10 does not.

 The issue turned out to be that when resetting only flag
BMCR_RESET is set, not BMCR_ANENABLE.
 (In ar8216.c always both flags are set when the switch is
 reset)
 Therefore autoneg was not enabled. Also later in the boot
  process
it doesn't get enabled.
 Adding BMCR_ANENABLE solved the problem and now also under
 3.14
all ports use 1000MBit/full.

 However I'm not sure whether it's a poper fix to add
BMCR_ANENABLE in this generic phy function.
 It might not be appropriate for other phy's.

 After resetting the switch later in the boot process
ar8xxx_phy_config_aneg is called with
 phydev-addr being 0.
 In this case the function returns immediately. Otherwise it
  would
call genphy_config_aneg.
 Calling genphy_config_aneg would also solve the problem as it
checks for BMCR_ANENABLE
 being set and sets it if needed.
 I don't know the reason why genphy_config_aneg isn't called in
case of addr 0.
 Or is this a typo and the check actually should be addr != 0 ?

 Rgds, Heiner

   
The following rudimentary patch works fine for me with kernel
  3.14.18 on
TP-LINK TL-WDR4900 (mpc85xx with AR8327Nv4)
TP-LINK TL-WDR4300 ( ar71xx with AR8327Nv2)
   
Apart from using genphy_config_aneg also for addr==0 I replaced
msleep(1000)
with a polling function inspired by phy_poll_reset in phy_device.c
On AR8327 the reset actually takes less than 20ms. Sleeping for
  1000ms
seems to be a waste of time.
   
Little 

[OpenWrt-Devel] [PATCH 2/2] procd: fix/clean some conditions in nand.sh

2014-11-24 Thread Rafał Miłecki
1) nand_upgrade_tar: use a simpler condition that matches if () { }
   logic and fix check of $kernel_length variable
2) nand_do_upgrade_stage2: use case, otherwise one could believe we
   always call nand_upgrade_tar

Signed-off-by: Rafał Miłecki zaj...@gmail.com
---
This hasn't been tested on any hardware, could someone try that just in
case?
---
 package/system/procd/files/nand.sh | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/package/system/procd/files/nand.sh 
b/package/system/procd/files/nand.sh
index 0d30810..1da63e2 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -250,10 +250,10 @@ nand_upgrade_tar() {
local has_kernel=1
local has_env=0
 
-   [ kernel_length = 0 -o -z $kernel_mtd ] || {
+   [ $kernel_length != 0 -a -n $kernel_mtd ]  {
tar xf $tar_file sysupgrade-$board_name/kernel -O | mtd write - 
$CI_KERNPART
}
-   [ kernel_length = 0 -o ! -z $kernel_mtd ]  has_kernel=0
+   [ $kernel_length = 0 -o ! -z $kernel_mtd ]  has_kernel=0
 
nand_upgrade_prepare_ubi $rootfs_length $rootfs_type $has_kernel 
$has_env
 
@@ -277,9 +277,11 @@ nand_do_upgrade_stage2() {
 
[ ! $(find_mtd_index $CI_UBIPART) ]  CI_UBIPART=rootfs
 
-   [ $file_type = ubi ]  nand_upgrade_ubinized $1
-   [ $file_type = ubifs ]  nand_upgrade_ubifs $1
-   nand_upgrade_tar $1
+   case $file_type in
+   ubi)  nand_upgrade_ubinized $1;;
+   ubifs)nand_upgrade_ubifs $1;;
+   *)  nand_upgrade_tar $1;;
+   esac
 }
 
 nand_upgrade_stage2() {
-- 
1.8.4.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/2] procd: document nand.sh a bit

2014-11-24 Thread Rafał Miłecki
Signed-off-by: Rafał Miłecki zaj...@gmail.com
---
 package/system/procd/files/nand.sh | 16 
 1 file changed, 16 insertions(+)

diff --git a/package/system/procd/files/nand.sh 
b/package/system/procd/files/nand.sh
index f933629..0d30810 100644
--- a/package/system/procd/files/nand.sh
+++ b/package/system/procd/files/nand.sh
@@ -201,6 +201,7 @@ nand_do_upgrade_success() {
reboot -f
 }
 
+# Flash the UBI image to MTD partition
 nand_upgrade_ubinized() {
local ubi_file=$1
local mtdnum=$(find_mtd_index $CI_UBIPART)
@@ -223,6 +224,7 @@ nand_upgrade_ubinized() {
nand_do_upgrade_success
 }
 
+# Write the UBIFS image to UBI volume
 nand_upgrade_ubifs() {
local rootfs_length=`(cat $1 | wc -c) 2 /dev/null`
 
@@ -269,6 +271,7 @@ nand_upgrade_tar() {
nand_do_upgrade_success
 }
 
+# Recognize type of passed file and start the upgrade process
 nand_do_upgrade_stage2() {
local file_type=$(identify $1)
 
@@ -319,6 +322,19 @@ nand_upgrade_stage1() {
 }
 append sysupgrade_pre_upgrade nand_upgrade_stage1
 
+# Check if passed file is a valid one for NAND sysupgrade. Currently it accepts
+# 3 types of files:
+# 1) UBI - should contain an ubinized image, header is checked for the proper
+#MAGIC
+# 2) UBIFS - should contain UBIFS partition that will replace rootfs volume,
+#header is checked for the proper MAGIC
+# 3) TRX - archive has to include sysupgrade-BOARD directory with a non-empty
+#CONTROL file (at this point its content isn't verified)
+#
+# You usually want to call this function in platform_check_image.
+#
+# $(1): board name, used in case of passing TRX file
+# $(2): file to be checked
 nand_do_platform_check() {
local board_name=$1
local tar_file=$2
-- 
1.8.4.5
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-11-24 Thread Weedy
On Mon, Nov 24, 2014 at 3:45 AM, Heiner Kallweit hkallwe...@gmail.com wrote:

 On Mon, Nov 24, 2014 at 1:06 AM, Felix Fietkau n...@openwrt.org wrote:

 On 2014-11-23 23:03, Weedy wrote:
 
  On Nov 23, 2014 4:35 PM, Weedy weedy2...@gmail.com
  mailto:weedy2...@gmail.com wrote:
 
 
  On Nov 19, 2014 8:47 AM, John Crispin blo...@openwrt.org
  mailto:blo...@openwrt.org wrote:
  
  
  
   On 19/11/2014 14:44, Weedy wrote:
   
On Oct 30, 2014 5:08 PM, Heiner Kallweit hkallwe...@gmail.com
  mailto:hkallwe...@gmail.com
mailto:hkallwe...@gmail.com mailto:hkallwe...@gmail.com wrote:
   
Am 30.10.2014 um 07:22 schrieb Heiner Kallweit:
 Am 30.10.2014 um 03:36 schrieb Florian Fainelli:
 Le 28/10/2014 11:46, Heiner Kallweit a écrit :
 After a little more thinking about it and looking at the code
 I
basically have two questions:

 1.
 Is it actually needed to exclude certain phy's in
ar8xxx_phy_config_aneg?
 (At least for AR8327 it doesn't get called with an addr != 0
  anyway)
 Else we could remove ar8xxx_phy_config_aneg and directly
 register
genphy_config_aneg as
 callback for autoneg configuration.

 Address 0 is special, since this is a MDIO broadcast address
 that
will usually be handled by switches as write to all front-panel
  ports.


 2.
 Call sequence with regard to ar8216 is:
 ar8216: ar8xxx_phy_probe
 phy: phy_attach_direct
 phy: phy_init_hw
 ar8216: ar8xxx_phy_config_init
 ar8216: ar8xxx_phy_config_aneg

 ar8216 driver handles AR8327/AR8337 different from the other
supported switch types.
 ar8xxx_start incl. more detailed configuration is called from
ar8xxx_phy_probe already.
 For the other switch types it's called from
  ar8xxx_phy_config_init.

 I wonder whether doing detailed configuration in the probe
 stage
might be too early.
 phy_init_hw resets the switch anyway later.
 Doing the detailed setup in ar8xxx_phy_config_init seems to be
more suited however
 there might be good reason why it's handled the way it is.

 I suppose that you could re-advertise auto-negotiation by
 calling
genphy_config_advert() in the config_init routine.

 The actual problem is caused by BMCR_ANENABLE being cleared by
 the
reset in phy_init_hw.
 As far as I can see genphy_config_advert doesn't bring back
  this flag.
 What does genphy_config_aneg mainly do?
   - call genphy_config_advert
   - check if BMCR_ANENABLE is set
   - if it's not, call genphy_restart_aneg
 Therefore, to bring back BMCR_ANENABLE, we have to call
genphy_config_aneg or genphy_restart_aneg.
 genphy_restart_aneg most likely is sufficient, however I don't
 see
that genphy_config_aneg
 can do any harm if being called with addr == 0.
 At least for me it works perfectly fine to call
 genphy_config_aneg
for all addr's.

 Rgds, Heiner



 Rgds,
 Heiner


 Am 27.10.2014 um 22:00 schrieb Heiner Kallweit:
 With two different TPLINK routers (both with a AR8327N
 switch) I
faced the issue that with
 kernel 3.14 certain switch ports used 10MBit/half only.
 Under kernel 3.10 everything was fine and the same ports used
1000MBit/full.

 As the ar8216 driver is the same I had a look at the common
 phy
code in drivers/net/phy.
 In function phy_init_hw in phy_device.c kernel 3.14 resets
 the
phy whilst 3.10 does not.

 The issue turned out to be that when resetting only flag
BMCR_RESET is set, not BMCR_ANENABLE.
 (In ar8216.c always both flags are set when the switch is
 reset)
 Therefore autoneg was not enabled. Also later in the boot
  process
it doesn't get enabled.
 Adding BMCR_ANENABLE solved the problem and now also under
 3.14
all ports use 1000MBit/full.

 However I'm not sure whether it's a poper fix to add
BMCR_ANENABLE in this generic phy function.
 It might not be appropriate for other phy's.

 After resetting the switch later in the boot process
ar8xxx_phy_config_aneg is called with
 phydev-addr being 0.
 In this case the function returns immediately. Otherwise it
  would
call genphy_config_aneg.
 Calling genphy_config_aneg would also solve the problem as it
checks for BMCR_ANENABLE
 being set and sets it if needed.
 I don't know the reason why genphy_config_aneg isn't called
 in
case of addr 0.
 Or is this a typo and the check actually should be addr != 0
 ?

 Rgds, Heiner

   
The following rudimentary patch works fine for me with kernel
  3.14.18 on
TP-LINK TL-WDR4900 (mpc85xx with AR8327Nv4)
TP-LINK TL-WDR4300 ( ar71xx with AR8327Nv2)
   
Apart from using genphy_config_aneg also for addr==0 I replaced
msleep(1000)
with a polling function inspired by 

[OpenWrt-Devel] I *think* I have found the bug for my RB2011 problem

2014-11-24 Thread Chris Green
I think I have found the bug which prevents the Gigabit ports on my
rb-2011uias-2hnd from working.

The rb-2011uias-2hnd is missing from the following file:-


trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/etc/uci-defaults/03_network-switchX-migration

So the correct things won't happen for my RB2011.


I think I can fix it myself in my downloaded trunk so I will report
back later to confirm the fix works (I hope!).


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


Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-11-24 Thread Bastian Bittorf
* Weedy weedy2...@gmail.com [24.11.2014 14:14]:

[deleted ~250 lines fullquote]

you (and the others too) are experienced users, so please read
https://www.netmeister.org/news/learn2quote2.html#ss2.8

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


[OpenWrt-Devel] [PATCH 0/4] Add multi-line option value support to UCI config file parser.

2014-11-24 Thread Yousong Zhou
I am not quite familiar with the early history of how UCI file was parsed, but
thought that UCI config files were parsed in a quite clever way all by shell
scripts which made it possible to have multi-line value for options.  AFAIK, at
least package openvpn [1] depends on this feature.

This series tries to fix an issue with current C implementation of parser for
UCI config file.  The current code uses pointers into line buffer
`ctx-pctx-buf` which may need to grow in size when a backslash was found at
the end of line.  The grow is implemented by function uci_realloc() which may
return an address different from the original.  Then the parser will be in a
state where ctx-pctx-buf changed, but various char **str and char **target
are not updated along.

The realloc() can be triggered by something like below (in function
parse_double_quote()).

config sockd 'instance0'
option internal_network 'vpn'
option external_network 'wan'
option extra_config a \
 b \
 c \


A few test cases, including importing/exporting config, getting/setting option
values were also included trying to verify the patch.

I do not expect this to be accepted in the neare future because at later stage
of preparing this series I saw that LF and NL characters are explicitly deemed
illegal for option value in uci_validate_text().  But if you are interested in
this feature, you can give it a try.

I found multi-line option value useful in cases where I want parts of the
program's configuration values to be connected with OpenWrt system state, e.g.
stop/start services when the status of the dependent network go down/up, while
still keep the related bits all in one place, not just many remedy scripts
scattered here and there.

[1] see `append_params()` in package/network/services/openvpn/files/openvpn.init

Yousong Zhou (4):
  Drop test cases for deprecated ucimap-example.
  Sync ref test result with current implementation.
  Use offset into parser buffer to avoid potential heap overflow.
  Add test coverage for multi-line option value.

 delta.c|   15 +-
 file.c |  216 +++-
 test/references/add_section.result |2 +-
 test/references/export.data|7 +-
 test/references/export.result  |   15 +-
 test/references/get_multiline.data |5 +
 test/references/import.data|7 +-
 test/references/import.result  |   13 +-
 test/references/set_existing_option.result |2 +-
 .../set_existing_option_multiline.result   |2 +
 test/references/set_named_section.result   |2 +-
 test/references/set_nonexisting_option.result  |2 +-
 .../set_nonexisting_option_multiline.result|2 +
 test/references/set_parsing_multiline.data |2 +
 test/tests.d/020_get   |9 +
 test/tests.d/030_set   |   16 ++
 test/tests.d/060-ucimap_example|9 -
 uci_internal.h |8 +-
 util.c |   11 +-
 19 files changed, 218 insertions(+), 127 deletions(-)
 create mode 100644 test/references/get_multiline.data
 create mode 100644 test/references/set_existing_option_multiline.result
 create mode 100644 test/references/set_nonexisting_option_multiline.result
 create mode 100644 test/references/set_parsing_multiline.data
 delete mode 100644 test/tests.d/060-ucimap_example

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


[OpenWrt-Devel] [PATCH 1/4] Drop test cases for deprecated ucimap-example.

2014-11-24 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/tests.d/060-ucimap_example |9 -
 1 file changed, 9 deletions(-)
 delete mode 100644 test/tests.d/060-ucimap_example

diff --git a/test/tests.d/060-ucimap_example b/test/tests.d/060-ucimap_example
deleted file mode 100644
index 984726b..000
--- a/test/tests.d/060-ucimap_example
+++ /dev/null
@@ -1,9 +0,0 @@
-test_ucimap_example()
-{
-   rm -rf ./save
-   ( cd ..; ./ucimap-example -s )  ${TMP_DIR}/ucimap_example.result
-   assertSameFile ${TMP_DIR}/ucimap_example.result 
${REF_DIR}/ucimap_example_1.result
-   ( cd ..; ./ucimap-example -s )  ${TMP_DIR}/ucimap_example.result
-   assertSameFile ${TMP_DIR}/ucimap_example.result 
${REF_DIR}/ucimap_example_2.result
-   rm -rf ./save
-}
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 2/4] Sync ref test result with current implementation.

2014-11-24 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/export.result |   10 +-
 test/references/import.result |8 
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/test/references/export.result b/test/references/export.result
index 957e687..bc06655 100644
--- a/test/references/export.result
+++ b/test/references/export.result
@@ -1,7 +1,7 @@
-package 'export'
+package export
 
-config 'type' 'section'
-   option 'opt' 'val'
-   list 'list_opt' 'val0'
-   list 'list_opt' 'val1'
+config type 'section'
+   option opt 'val'
+   list list_opt 'val0'
+   list list_opt 'val1'
 
diff --git a/test/references/import.result b/test/references/import.result
index c7e4d39..47704b8 100644
--- a/test/references/import.result
+++ b/test/references/import.result
@@ -1,6 +1,6 @@
 
-config 'type' 'section'
-   option 'opt' 'val'
-   list 'list_opt' 'val0'
-   list 'list_opt' 'val1'
+config type 'section'
+   option opt 'val'
+   list list_opt 'val0'
+   list list_opt 'val1'
 
-- 
1.7.10.4
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/4] Use offset into parser buffer to avoid potential heap overflow.

2014-11-24 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 delta.c|   15 +++-
 file.c |  216 +++-
 uci_internal.h |8 ++-
 util.c |   11 +--
 4 files changed, 147 insertions(+), 103 deletions(-)

diff --git a/delta.c b/delta.c
index 32628dc..082633b 100644
--- a/delta.c
+++ b/delta.c
@@ -471,8 +471,19 @@ int uci_save(struct uci_context *ctx, struct uci_package 
*p)
 
if (h-cmd == UCI_CMD_REMOVE  !h-value)
fprintf(f, \n);
-   else
-   fprintf(f, =%s\n, h-value);
+   else {
+   int i;
+
+   fprintf(f, =');
+   for (i = 0; h-value[i]; i++) {
+   unsigned char c = h-value[i];
+   if (c != '\'')
+   fputc(c, f);
+   else
+   fprintf(f, '\\'');
+   }
+   fprintf(f, '\n);
+   }
uci_free_delta(h);
}
 
diff --git a/file.c b/file.c
index a5e242f..8d4408d 100644
--- a/file.c
+++ b/file.c
@@ -48,11 +48,16 @@ __private void uci_getln(struct uci_context *ctx, int 
offset)
pctx-buf = uci_malloc(ctx, LINEBUF);
pctx-bufsz = LINEBUF;
}
+   /* `offset' may off by one */
+   if (offset = pctx-bufsz) {
+   pctx-bufsz *= 2;
+   pctx-buf = uci_realloc(ctx, pctx-buf, pctx-bufsz);
+   }
 
ofs = offset;
do {
p = pctx-buf[ofs];
-   p[ofs] = 0;
+   p[0] = 0;
 
p = fgets(p, pctx-bufsz - ofs, pctx-file);
if (!p || !*p)
@@ -61,36 +66,36 @@ __private void uci_getln(struct uci_context *ctx, int 
offset)
ofs += strlen(p);
if (pctx-buf[ofs - 1] == '\n') {
pctx-line++;
-   if (ofs = 2  pctx-buf[ofs - 2] == '\r')
-   pctx-buf[ofs - 2] = 0;
-   else
-   pctx-buf[ofs - 1] = 0;
return;
}
 
if (pctx-bufsz  LINEBUF_MAX/2)
-   uci_parse_error(ctx, p, line too long);
+   uci_parse_error(ctx, line too long);
 
pctx-bufsz *= 2;
pctx-buf = uci_realloc(ctx, pctx-buf, pctx-bufsz);
} while (1);
 }
 
-
 /*
  * parse a character escaped by '\'
  * returns true if the escaped character is to be parsed
  * returns false if the escaped character is to be ignored
  */
-static inline bool parse_backslash(struct uci_context *ctx, char **str)
+static bool parse_backslash(struct uci_context *ctx)
 {
+   struct uci_parse_context *pctx = ctx-pctx;
+
/* skip backslash */
-   *str += 1;
+   pctx-pos += 1;
 
/* undecoded backslash at the end of line, fetch the next line */
-   if (!**str) {
-   *str += 1;
-   uci_getln(ctx, *str - ctx-pctx-buf);
+   if (!pctx_cur_char(pctx)
+   || pctx_cur_char(pctx) == '\n'
+   || (pctx_cur_char(pctx) == '\r' 
+   pctx_char(pctx, pctx_pos(pctx) + 1) == '\n' 
+   !pctx_char(pctx, pctx_pos(pctx) + 2))) {
+   uci_getln(ctx, pctx-pos);
return false;
}
 
@@ -102,91 +107,106 @@ static inline bool parse_backslash(struct uci_context 
*ctx, char **str)
  * move the string pointer forward until a non-whitespace character or
  * EOL is reached
  */
-static void skip_whitespace(struct uci_context *ctx, char **str)
+static void skip_whitespace(struct uci_context *ctx)
 {
-restart:
-   while (**str  isspace(**str))
-   *str += 1;
+   struct uci_parse_context *pctx = ctx-pctx;
 
-   if (**str == '\\') {
-   if (!parse_backslash(ctx, str))
-   goto restart;
-   }
+   while (pctx_cur_char(pctx)  isspace(pctx_cur_char(pctx)))
+   pctx-pos += 1;
 }
 
-static inline void addc(char **dest, char **src)
+static inline void addc(struct uci_context *ctx, int *pos_dest, int *pos_src)
 {
-   **dest = **src;
-   *dest += 1;
-   *src += 1;
+   struct uci_parse_context *pctx = ctx-pctx;
+
+   pctx_char(pctx, *pos_dest) = pctx_char(pctx, *pos_src);
+   *pos_dest += 1;
+   *pos_src += 1;
 }
 
 /*
  * parse a double quoted string argument from the command line
  */
-static void parse_double_quote(struct uci_context *ctx, char **str, char 
**target)
+static void parse_double_quote(struct uci_context *ctx, int *target)
 {
+   struct uci_parse_context *pctx = ctx-pctx;
char c;
 
/* skip quote character */
-   *str += 1;
+   pctx-pos += 1;
 
-   while ((c = **str)) {
+   while (1) {

[OpenWrt-Devel] [PATCH 4/4] Add test coverage for multi-line option value.

2014-11-24 Thread Yousong Zhou

Signed-off-by: Yousong Zhou yszhou4t...@gmail.com
---
 test/references/add_section.result |2 +-
 test/references/export.data|7 ++-
 test/references/export.result  |5 +
 test/references/get_multiline.data |5 +
 test/references/import.data|7 ++-
 test/references/import.result  |5 +
 test/references/set_existing_option.result |2 +-
 test/references/set_existing_option_multiline.result   |2 ++
 test/references/set_named_section.result   |2 +-
 test/references/set_nonexisting_option.result  |2 +-
 .../references/set_nonexisting_option_multiline.result |2 ++
 test/references/set_parsing_multiline.data |2 ++
 test/tests.d/020_get   |9 +
 test/tests.d/030_set   |   16 
 14 files changed, 62 insertions(+), 6 deletions(-)
 create mode 100644 test/references/get_multiline.data
 create mode 100644 test/references/set_existing_option_multiline.result
 create mode 100644 test/references/set_nonexisting_option_multiline.result
 create mode 100644 test/references/set_parsing_multiline.data

diff --git a/test/references/add_section.result 
b/test/references/add_section.result
index c7daab6..37e0e7d 100644
--- a/test/references/add_section.result
+++ b/test/references/add_section.result
@@ -1 +1 @@
-+add.section=type
++add.section='type'
diff --git a/test/references/export.data b/test/references/export.data
index c7e4d39..9e4d3c9 100644
--- a/test/references/export.data
+++ b/test/references/export.data
@@ -3,4 +3,9 @@ config 'type' 'section'
option 'opt' 'val'
list 'list_opt' 'val0'
list 'list_opt' 'val1'
-
+   option mul_line_opt_sq 'line 1
+line 2 \
+line 3'
+   option mul_line_opt_dq \Hello\, \
+World.\'
+
diff --git a/test/references/export.result b/test/references/export.result
index bc06655..2fa5b48 100644
--- a/test/references/export.result
+++ b/test/references/export.result
@@ -4,4 +4,9 @@ config type 'section'
option opt 'val'
list list_opt 'val0'
list list_opt 'val1'
+   option mul_line_opt_sq 'line 1
+line 2 \
+line 3'
+   option mul_line_opt_dq 'Hello, World.'\''
+'
 
diff --git a/test/references/get_multiline.data 
b/test/references/get_multiline.data
new file mode 100644
index 000..bacb804
--- /dev/null
+++ b/test/references/get_multiline.data
@@ -0,0 +1,5 @@
+config 'type' 'section'
+   # Cannot preserve trailling whitespace with assertEquals.
+   option opt \Hello, \
+World.
+\'
diff --git a/test/references/import.data b/test/references/import.data
index 6a9b737..a7a21ef 100644
--- a/test/references/import.data
+++ b/test/references/import.data
@@ -4,4 +4,9 @@ config 'type' 'section'
option 'opt' 'val'
list 'list_opt' 'val0'
list 'list_opt' 'val1'
-
+   option mul_line_opt_sq \''line 1
+line 2 \
+line 3'\'
+   option mul_line_opt_dq \Hello, \
+World.\'
+
diff --git a/test/references/import.result b/test/references/import.result
index 47704b8..56eb96f 100644
--- a/test/references/import.result
+++ b/test/references/import.result
@@ -3,4 +3,9 @@ config type 'section'
option opt 'val'
list list_opt 'val0'
list list_opt 'val1'
+   option mul_line_opt_sq ''\''line 1
+line 2 \
+line 3'\'''
+   option mul_line_opt_dq 'Hello, World.'\''
+'
 
diff --git a/test/references/set_existing_option.result 
b/test/references/set_existing_option.result
index c88deea..902cff3 100644
--- a/test/references/set_existing_option.result
+++ b/test/references/set_existing_option.result
@@ -1 +1 @@
-set.section.opt=val
+set.section.opt='val'
diff --git a/test/references/set_existing_option_multiline.result 
b/test/references/set_existing_option_multiline.result
new file mode 100644
index 000..85e1ada
--- /dev/null
+++ b/test/references/set_existing_option_multiline.result
@@ -0,0 +1,2 @@
+set.section.opt='Hello,\'\''
+World'
diff --git a/test/references/set_named_section.result 
b/test/references/set_named_section.result
index 2a4145b..4ee5c2e 100644
--- a/test/references/set_named_section.result
+++ b/test/references/set_named_section.result
@@ -1 +1 @@
-set.section=named
+set.section='named'
diff --git a/test/references/set_nonexisting_option.result 
b/test/references/set_nonexisting_option.result
index c88deea..902cff3 100644
--- a/test/references/set_nonexisting_option.result
+++ b/test/references/set_nonexisting_option.result
@@ -1 +1 @@
-set.section.opt=val
+set.section.opt='val'
diff --git a/test/references/set_nonexisting_option_multiline.result 
b/test/references/set_nonexisting_option_multiline.result
new file mode 100644
index 000..85e1ada
--- /dev/null
+++ b/test/references/set_nonexisting_option_multiline.result
@@ -0,0 +1,2 @@

Re: [OpenWrt-Devel] jffs takes about 18 minutes to get ready on 3.10 kernel (probably solved)

2014-11-24 Thread Claudio Thomas
Hi,

On 29.10.2014 23:32, Claudio Thomas wrote:
 On 29.10.2014 13:37, Bastian Bittorf wrote:
 * Claudio Thomas c...@xmodus-systems.de [29.10.2014 13:18]:
 [  800.742671] jffs2: notice: (888) jffs2_build_xattr_subsystem:
 how large is the partitionsize?
 rootfs_data created automatically, ofs=0x96, len=0x326
 while we are at it:
 till r40402 we where probing jffs2_ready() before
 writing to disc (e.g. new config-files).

 what is the supposed way the handle that now?
 (we grep the syslog for 'complete building xattr subsystem')
 Sorry for the long delay, the tests need some time :-(

 I've made now a git pull+make clean, so that I've tested now again
 with BB@43085:
 (For the tests I've booted using tftp+ramdisk)
 1. boot 3.10 with a working jffs and 3.8 config files: ~1183s(1),
 ~1232s(2),
 than run /sbin/jffs2reset -y (323s remove files time) and
 2. boot 3.10 with a empty jffs: ~1161s(1), ~1212s(2),
 than run umount /overlay; /sbin/jffs2reset -y (612s erase time) and
 3. boot 3.10 with an erased jffs,
 see No jffs marker found (!) and
 received no switching to overlay (!) message,
 but /overlay is mounted: ~896s(1 - until complete building...),
 ~899s(2)
 4. boot 3.10 with rebuilded jffs: ~1167(1), ~1205(2)

 For comparison a 3.8 build based on CC@43032
 1. boot 3.8: ~17.2s(1);  /sbin/jffs2reset -y (1s remove files time)
 2. boot 3.8 with empty jffs: ~5s(1); umount /overlay;
 /sbin/jffs2reset -y (87s erase time)
 3. boot 3.8 with erased jffs: ~200s(1)
 4. boot 3.8 with rebuild jffs: ~17s(1)

 Is this helpful or should I test anything else?
 After comparing both there seem to be a performance issue, because
 when looking only ate the erase time the 3.8 version erases the flash
 8 times faster. Any idea what I could check?

It seems that I finally find the reason for the long boot delay.
After making some strace on jffsreset I find out that the longest delay
occurs after an ioctl-call:
 0.000751 ioctl(3, MEMUNLOCK, 0xbfcde878) = 0
   293.231596 open(0x4801d1d6, O_RDONLY) = 4

This was nothing unexpected, but after I while I searched the web for
mtd+jffs+MEMUNLOCK and found the following:
http://stackoverflow.com/questions/19706584/erasing-flash-nor-ioctlmemunlock-return-status
Which was implemented in 3. 10 as described here:
http://lists.infradead.org/pipermail/linux-mtd/2012-December/045230.html

The Problem is, it does not seem to run as expected on my hardware.
Removing it by  a small patch solved the Problem. I know that this isn't
the best solution, but removing it I'm at the same trustworthy point as
I was when using the 3.8 kernel. The affected files are
drivers/mtd/chips/cfi_cmdset_0002.c and
drivers/mtd/devices/m25p80.c

BTW: The last one was massive rewritten in 3.14, so that I guess that
I'm not the only one that found that this implementation wasn't ok
enough :-)

In hope that I finally have a stable state for the mpc8306 on the xm1700
board.
I#ll come back after some more test :-)

Thanks,
Claudio

--
Working on OpenWrt BB for Xmodus Systems XM1710E GSM/UMTS Router
http://www.xmodus-systems.de/en/terminals/routers.html







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


Re: [OpenWrt-Devel] Autoneg problems with ar8216 on kernel 3.14 (related to ticket 17800)

2014-11-24 Thread Weedy
On Nov 24, 2014 8:27 AM, Bastian Bittorf bitt...@bluebottle.com wrote:

 * Weedy weedy2...@gmail.com [24.11.2014 14:14]:

 [deleted ~250 lines fullquote]

 you (and the others too) are experienced users, so please read
 https://www.netmeister.org/news/learn2quote2.html#ss2.8

 bye, bastian

I've been replying from mobile lately.
It's pure laziness on my part, sorry about that.
(Gmail also collapses everything by default so I don't even think about it
anymore)
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] I *think* I have found the bug for my RB2011 problem

2014-11-24 Thread Chris Green
On Mon, Nov 24, 2014 at 12:06:04PM +, Chris Green wrote:
 I think I have found the bug which prevents the Gigabit ports on my
 rb-2011uias-2hnd from working.
 
 The rb-2011uias-2hnd is missing from the following file:-
 
 trunk/build_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/etc/uci-defaults/03_network-switchX-migration
  
 
 
 So the correct things won't happen for my RB2011.
 
 
 I think I can fix it myself in my downloaded trunk so I will report
 back later to confirm the fix works (I hope!).
 
However it's still not working.  :-(

Should the scripts in /etc/uci-defaults be there after rebooting?  I
checked when I installed (i.e. immediately after unpacking the .tar.gz
file) and they were there then but after rebooting the Mikrotik they
were no longer there.

I can't see any evidence in the syslog of 03_network-switchX-migration
having been run.

Help!!!

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


[OpenWrt-Devel] Patch to fix issue with renamed dts target for mpc85xx/3.14

2014-11-24 Thread Heiner Kallweit
On Nov 20th I submitted a patch to fix an issue with a dts target which was
renamed under 3.14:
mpc85xx: fix missing dts target for kernel 3.14 Could you please apply it?
It fixes the reopened issue 18020.

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


Re: [OpenWrt-Devel] bridge doesn't forward eap frames

2014-11-24 Thread Michael Markusch
Am 24.11.2014 um 07:09 schrieb Rafał Miłecki:
 On 24 November 2014 at 01:07, Felix Fietkau n...@openwrt.org wrote:
 On 2014-11-23 21:10, Michael Markusch wrote:
 Hi,

 my WRT54GL with OpenWrt 12.09 doesn't forward eap frames in bridged
 ap-mode. Since kernel 3.2, there is a way to force a bridge forward eap
 frames.

 http://www.gremwell.com/linux_kernel_can_forward_802_1x

 If I look in the patches of the 12.09, I found a patch
 bridge_no_eap_forward, which drops the eap frames.

 How can I forward eap frames?
 What do you need this for?
 May I ask the other way? What do we need this patch for? When seeing
 such a non described patches, I'm always afraid one day noone will
 understand them ;)

I need this for 802.1x authentication on a multisession switch port
(authenticator). All supplicants go over the WRT54GL (lan or wlan) and
authenticated on the switch port. The WRT54GL operates like a
transparent bridge.

Is there a way to do this?

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


Re: [OpenWrt-Devel] [RFC 0/2]

2014-11-24 Thread John Crispin


On 21/11/2014 09:41, Matthias Schiffer wrote:
 Hi, this adds support for the new TP-LINK outdoor series
 CPE210/220/510/520 (Pharos). I'm sending this as a RFC as there
 is a still a number of open questions:
 
 eth0 configuration == Looking at the log output of
 the stock firmware, it seems like the to ethernet ports both have
 their own MAC.
 
 After booting OpenWrt, both ethernet ports are connected to the
 internal switch, which is connected to the CPUs GMAC1; I haven't
 been able to get a link on GMAC0 at all, so the current code of
 these patches only initializes GMAC1. I don't know if using both
 GMACs would be preferable, but it seems a bit strange like this, so
 maybe someone with some more insight into the Atheros SoCs could
 look at it or give me some hints?

if you connect tot he switch with 2 macs then you can do the lan/wan
segmenting via vlan'ing inside the swith without the need for a trunk
port and the matching vlan1/2 inside the network config. it would be
preferable to have both working. its not a reason to not merge though





 LED configuration = The CPEs have 6 controllable
 LEDs: LAN0, LAN1 and four WLAN signal indicators. Currently my
 patches configure all signal indicators using rssileds, but no 
 status or WLAN activity LEDs are left like this.
 
 
 Image generation  The new TP-LINK bootloader
 (TP-LINK Safeloader) expects the kernel image in ELF format. I've
 tried building the ELF LZMA loader via Image/BuildLoader, but as
 soon as I added a kernel command line there, the image wouldn't
 boot at all. As a workaround, I'm using PatchKernelLzma and then
 build the LZMA loader using the patched kernel as LOADER_DATA.
 
 Also, there's no initramfs support so far. (I've never used
 initramfs with OpenWrt, but it seems like all other image types
 support it?)
 

initramfs is a ram boot image. the kernel has a rootfs inside and most
bootloader will allow you to boot hese without the need to actually
flash the image.



 
 Apart from these issues, everything seems to work fine. I've only
 tested this on the CPE510 so far, but I don't see why it shouldn't
 work the same on the CPE210 (the stock firmware, PharOS, also
 uses just one image for both devices). The CPE220 and CPE520
 variants aren't available yet, but as far as I can tell from the
 information in the manual book, the only difference is the antenna
 (lower angle, higher gain), so I've included them as supported
 devices as well.
 
 

looks good, i saw 2-3 mini details int he firmware tool which i will
fix up while merging.

one question, why the mach file and the leds named cpe501 and not say
cpe201 ? (just curious)

John



 
 Matthias Schiffer (2): firmware-utils: add new tool mktplinkfw3 for
 the new TP-LINK Pharos devices (CPE210/220/510/520) ar71xx: add
 support for TP-LINK CPE210/220/510/520
 
 target/linux/ar71xx/base-files/etc/diag.sh |   3 + 
 .../ar71xx/base-files/etc/uci-defaults/01_leds |  10 + 
 .../ar71xx/base-files/etc/uci-defaults/02_network  |   7 + 
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |  40 +- 
 .../ar71xx/base-files/lib/upgrade/platform.sh  |  32 ++ 
 target/linux/ar71xx/config-3.10|   1 + 
 .../ar71xx/files/arch/mips/ath79/mach-cpe510.c | 107 + 
 target/linux/ar71xx/generic/profiles/tp-link.mk|  11 + 
 target/linux/ar71xx/image/Makefile |  27 ++ 
 .../610-MIPS-ath79-openwrt-machines.patch  |  23 +- 
 tools/firmware-utils/Makefile  |   1 + 
 tools/firmware-utils/src/mktplinkfw3.c | 469
 + 12 files changed, 724 insertions(+), 7
 deletions(-) create mode 100644
 target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c create mode
 100644 tools/firmware-utils/src/mktplinkfw3.c
 
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] [PATCH] kernel: 3.18: Fix kmod-ipt-nat

2014-11-24 Thread Maxime Ripard
On Sun, Nov 23, 2014 at 06:38:18PM -0800, Florian Fainelli wrote:
 Le 07/11/2014 07:20, Maxime Ripard a écrit :
  The 3.18 kernel introduced new Kconfig options for the xt_nat and 
  iptable_nat
  kernel modules, that both belong to the ipt_nat kernel package.
  
  Enable this new options.
  
  Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com
 
 FWIW, applied in r43212.

Yeah, I saw that, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


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


[OpenWrt-Devel] [PATCH v2 0/2] defconfig support for 3.18

2014-11-24 Thread Maxime Ripard
Hi,

This is the second attempt to rely on the defconfigs mechanism instead
of generating our own full kernel configuration file.

This has been build tested, both before and after applying the first
patch on all the supported targets so far.

You can get a list of the various build runs, with both the log and
the generated kernel configuration file from:

http://free-electrons.com/~maxime/pub/openwrt/config-backup-with/
http://free-electrons.com/~maxime/pub/openwrt/config-backup-without/

This has been generated with the following script:
http://code.bulix.org/bbs1p3-87473

Maxime

Maxime Ripard (2):
  kernel: Use defconfig instead of full fledged kernel configuration
  kernel: 3.18: Strip off all the useless options

 include/kernel-defaults.mk   |   40 +-
 target/linux/generic/config-3.18 | 4355 --
 2 files changed, 32 insertions(+), 4363 deletions(-)

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


Re: [OpenWrt-Devel] [PATCH 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-24 Thread Maxime Ripard
Hi Florian,

On Sun, Nov 23, 2014 at 06:42:25PM -0800, Florian Fainelli wrote:
 Le 18/11/2014 02:27, Maxime Ripard a écrit :
  Hi Felix,
  
  On Sun, Nov 09, 2014 at 11:54:15AM +0100, Felix Fietkau wrote:
  On 2014-11-07 11:58, Maxime Ripard wrote:
  Rely on the Kconfig defconfig mechanism to fill all the missing options,
  instead of needing to set them all in the kernel configurations like what 
  was
  previously done.
 
  This will allow to trim down a lot the configuration files, avoid carrying
  unused configuration options and preserve the developpers mental health.
 
  Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com
  I think this is a very good idea. Did you verify on all relevant
  architectures that the resulting kernel config stays the same with this
  change?
  
  I've given a test-run on all the supported architectures, both with
  and without the patch.
  
  It pointed out that there was an incorrect assumption on my side that
  $(ARCH) would be the Linux architecture, which it isn't. A second
  version will follow shortly to address this.
 
 I have not seen a v2 patchset which addresses that? Thanks!

Sorry for the delay, I just sent it.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


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


[OpenWrt-Devel] [PATCH v2 1/2] kernel: Use defconfig instead of full fledged kernel configuration

2014-11-24 Thread Maxime Ripard
Rely on the Kconfig defconfig mechanism to fill all the missing options,
instead of needing to set them all in the kernel configurations like what was
previously done.

This will allow to trim down a lot the configuration files, avoid carrying
unused configuration options and preserve the developpers mental health.

Signed-off-by: Maxime Ripard maxime.rip...@free-electrons.com
---
 include/kernel-defaults.mk | 40 
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 8abd32d7141d..9fd96a234e37 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -100,16 +100,40 @@ define Kernel/SetNoInitramfs
echo 'CONFIG_INITRAMFS_SOURCE='  $(LINUX_DIR)/.config
 endef
 
+ifeq ($(ARCH),armeb)
+  LINUX_ARCH := arm
+else ifeq ($(ARCH),mipsel)
+  LINUX_ARCH := mips
+else ifeq ($(ARCH),mips64)
+  LINUX_ARCH := mips
+else ifeq ($(ARCH),um)
+  LINUX_ARCH := x86
+else ifeq ($(ARCH),i386)
+  LINUX_ARCH := x86
+else ifeq ($(ARCH),x86_64)
+  LINUX_ARCH := x86
+else
+  LINUX_ARCH := $(ARCH)
+endif
+
+DEFCONFIG_DIR = $(LINUX_DIR)/arch/$(LINUX_ARCH)/configs
+DEFCONFIG_NAME = openwrt_defconfig
+
 define Kernel/Configure/Default
-   $(LINUX_CONF_CMD)  $(LINUX_DIR)/.config.target
+   $(LINUX_CONF_CMD)  $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
 # copy CONFIG_KERNEL_* settings over to .config.target
-   awk 
'/^(#[[:space:]]+)?CONFIG_KERNEL/{sub(CONFIG_KERNEL_,CONFIG_);print}' 
$(TOPDIR)/.config  $(LINUX_DIR)/.config.target
-   echo # CONFIG_KALLSYMS_EXTRA_PASS is not set  
$(LINUX_DIR)/.config.target
-   echo # CONFIG_KALLSYMS_ALL is not set  $(LINUX_DIR)/.config.target
-   echo # CONFIG_KALLSYMS_UNCOMPRESSED is not set  
$(LINUX_DIR)/.config.target
-   echo # CONFIG_KPROBES is not set  $(LINUX_DIR)/.config.target
-   $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo 
$(TOPDIR)/.config  $(LINUX_DIR)/.config.override
-   $(SCRIPT_DIR)/kconfig.pl 'm+' '+' $(LINUX_DIR)/.config.target /dev/null 
$(LINUX_DIR)/.config.override  $(LINUX_DIR)/.config
+   awk 
'/^(#[[:space:]]+)?CONFIG_KERNEL/{sub(CONFIG_KERNEL_,CONFIG_);print}' \
+   $(TOPDIR)/.config  $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   echo # CONFIG_KALLSYMS_EXTRA_PASS is not set  
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   echo # CONFIG_KALLSYMS_ALL is not set  
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   echo # CONFIG_KALLSYMS_UNCOMPRESSED is not set  
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   echo # CONFIG_KPROBES is not set  
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target
+   $(SCRIPT_DIR)/metadata.pl kconfig $(TMP_DIR)/.packageinfo 
$(TOPDIR)/.config  \
+   $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).override
+   $(SCRIPT_DIR)/kconfig.pl 'm+' '+' 
$(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).target \
+/dev/null $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME).override  \
+   $(DEFCONFIG_DIR)/$(DEFCONFIG_NAME)
+   +$(MAKE) $(KERNEL_MAKEOPTS) $(DEFCONFIG_NAME)
$(call Kernel/SetNoInitramfs)
rm -rf $(KERNEL_BUILD_DIR)/modules
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(MAKE) 
$(KERNEL_MAKEOPTS) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
-- 
2.1.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 1/3] brcm63xx: fix image generation

2014-11-24 Thread Álvaro Fernández Rojas
This fixes build issues introduced on r43361.

Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index b991a66..e7fcd22 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -58,6 +58,7 @@ define Image/Build/CFEDTB
 endef
 
 define Image/Build/OLDCFEDTB
+   # Generate the tagged image
$(TOPDIR)/scripts/brcmImage.pl -t -p \
-b $(3) -c $(4) -e $(KERNEL_ENTRY) -a $(LOADADDR) \
-k $(KDIR)/vmlinux-$(2).lzma.cfe -r $(KDIR)/root.$(1) \
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH 3/3] brcm63xx: unify dt image generation

2014-11-24 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index f88ca8c..f91be63 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -172,75 +172,24 @@ define Image/Build/Initramfs
$(call 
Image/Build/HCS,initramfs,cvg834g,a020,0001,0022,$(KDIR)/vmlinux-initramfs)
 endef
 
-# $(1) = Profile
-# $(2) = dtb
-# $(3) = boardname
-# $(4) = chipid
-# $(5) = imagename
-# $(6) = additional options
-define CfeImageDTB
-  define Image/Build/$(5)
-$$(call Image/Build/CFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6))
+# $(1) = Image build
+# $(2) = Profile
+# $(3) = dtb
+# $(4) = boardname
+# $(5) = chipid
+# $(6) = imagename
+# $(7) = additional options
+define ImageDTB
+  define Image/Build/$(6)
+$$(call Image/Build/$(1),$$(1),$(3),$(4),$(5),$(6),$(7))
   endef
 
-  TARGET_Default_DTBS += $(2)
-  TARGET_Default_IMAGES += $(5)
-  TARGET_$(1)_DTBS += $(2)
-  TARGET_$(1)_IMAGES += $(5)
+  TARGET_Default_DTBS += $(3)
+  TARGET_Default_IMAGES += $(6)
+  TARGET_$(2)_DTBS += $(3)
+  TARGET_$(2)_IMAGES += $(6)
 endef
 
-# $(1) = Profile
-# $(2) = dtb
-# $(3) = boardname
-# $(4) = chipid
-# $(5) = imagename
-# $(6) = additional options
-define OldCfeImageDTB
-  define Image/Build/$(5)
-$$(call Image/Build/OLDCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6))
-  endef
-
-  TARGET_Default_DTBS += $(2)
-  TARGET_Default_IMAGES += $(5)
-  TARGET_$(1)_DTBS += $(2)
-  TARGET_$(1)_IMAGES += $(5)
-endef
-
-# $(1) = Profile
-# $(2) = dtb
-# $(3) = boardname
-# $(4) = chipid
-# $(5) = imagename
-# $(6) = additional options
-define Spw303vCfeImageDTB
-  define Image/Build/$(5)
-$$(call Image/Build/SPW303VCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6))
-  endef
-
-  TARGET_Default_DTBS += $(2)
-  TARGET_Default_IMAGES += $(5)
-  TARGET_$(1)_DTBS += $(2)
-  TARGET_$(1)_IMAGES += $(5)
-endef
-
-# $(1) = Profile
-# $(2) = dtb
-# $(3) = boardname
-# $(4) = chipid
-# $(5) = imagename
-# $(6) = additional options
-define ZyxCfeImageDTB
-  define Image/Build/$(5)
-$$(call Image/Build/ZYXCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6))
-  endef
-
-  TARGET_Default_DTBS += $(2)
-  TARGET_Default_IMAGES += $(5)
-  TARGET_$(1)_DTBS += $(2)
-  TARGET_$(1)_IMAGES += $(5)
-endef
-
-
 define Image/Build
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k 
conv=sync
 
@@ -298,99 +247,99 @@ define Image/Build
 endef
 
 # Generic 963281TAN
-$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-4M-flash-generic,--pad
 2))
-$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-8M-flash-generic,--pad
 4))
-$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-16M-flash-generic,--pad
 8))
+$(eval $(call 
ImageDTB,CFEDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-4M-flash-generic,--pad
 2))
+$(eval $(call 
ImageDTB,CFEDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-8M-flash-generic,--pad
 4))
+$(eval $(call 
ImageDTB,CFEDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-16M-flash-generic,--pad
 8))
 # Generic 96328avng
-$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-4M-flash-generic,--pad
 2))
-$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-8M-flash-generic,--pad
 4))
-$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-16M-flash-generic,--pad
 8))
+$(eval $(call 
ImageDTB,CFEDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-4M-flash-generic,--pad
 2))
+$(eval $(call 
ImageDTB,CFEDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-8M-flash-generic,--pad
 4))
+$(eval $(call 
ImageDTB,CFEDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-16M-flash-generic,--pad
 8))
 # Generic 96338GW
-$(eval $(call CfeImageDTB,96338GW,bcm96338GW,6338GW,6338,96338GW-generic))
+$(eval $(call ImageDTB,CFEDTB,96338GW,bcm96338GW,6338GW,6338,96338GW-generic))
 # Generic 96338W
-$(eval $(call CfeImageDTB,96338W,bcm96338W,6338W,6338,96338W-generic))
+$(eval $(call ImageDTB,CFEDTB,96338W,bcm96338W,6338W,6338,96338W-generic))
 # Generic 96345GW2
-$(eval $(call CfeImageDTB,96345GW2,bcm96345GW2,96345GW2,6345,96345GW2-generic))
-$(eval $(call 
CfeImageDTB,96345GW2,bcm96345GW2,96345GW2,6345,96345GW2-bc221,--layoutver 5))
+$(eval $(call 
ImageDTB,CFEDTB,96345GW2,bcm96345GW2,96345GW2,6345,96345GW2-generic))
+$(eval $(call 
ImageDTB,CFEDTB,96345GW2,bcm96345GW2,96345GW2,6345,96345GW2-bc221,--layoutver 
5))
 # Generic 96348GW
-$(eval $(call CfeImageDTB,96348GW,bcm96348GW,96348GW,6348,96348GW-generic))
-$(eval $(call 
CfeImageDTB,96348GW,bcm96348GW,96348GW,6348,96348GW-bc221,--layoutver 5))
+$(eval $(call ImageDTB,CFEDTB,96348GW,bcm96348GW,96348GW,6348,96348GW-generic))
+$(eval $(call 
ImageDTB,CFEDTB,96348GW,bcm96348GW,96348GW,6348,96348GW-bc221,--layoutver 5))
 # Generic 96348GW-10
-$(eval $(call 
CfeImageDTB,96348GW_10,bcm96348GW-10,96348GW-10,6348,96348GW-10-generic))
+$(eval $(call 

[OpenWrt-Devel] [PATCH 2/3] brcm63xx: move rsa signature to additional options

2014-11-24 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index e7fcd22..f88ca8c 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -52,9 +52,8 @@ define Image/Build/CFEDTB
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f 
$(KDIR)/root.$(1) \
--output $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin \
--boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
-   --load-addr $(LOADADDR) --rsa-signature $(6) \
-   --info1 -$(call Image/LimitName16,$(5)) --info2 $(1) \
-   $(7) $(8) $(9) $(10)
+   --load-addr $(LOADADDR) --info1 -$(call 
Image/LimitName16,$(5)) \
+   --info2 $(1) $(6)
 endef
 
 define Image/Build/OLDCFEDTB
@@ -70,7 +69,7 @@ define Image/Build/SPW303VCFEDTB
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f 
$(KDIR)/root.$(1) \
--output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
--boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
-   --load-addr $(LOADADDR) --rsa-signature $(6) $(7)
+   --load-addr $(LOADADDR) $(6)
# Fix up header
$(STAGING_DIR_HOST)/bin/spw303v -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
-o $(BIN_DIR)/openwrt-$(5)-$(1)-cfe-sysupgrade.bin
@@ -84,9 +83,8 @@ define Image/Build/ZYXCFEDTB
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f 
$(KDIR)/root.$(1) \
--output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
--boardid $(3) --chipid $(4) --entry $(KERNEL_ENTRY) \
-   --load-addr $(LOADADDR) --rsa-signature $(6) \
-   --info1 -$(call Image/LimitName16,$(5)) --info2 $(1) \
-   $(7) $(8) $(9) $(10)
+   --load-addr $(LOADADDR) --info1 -$(call 
Image/LimitName16,$(5)) \
+   --info2 $(1) $(6)
# Fix up header
$(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
-o $(BIN_DIR)/openwrt-$(5)-$(1)-zyxcfe.bin
@@ -179,11 +177,10 @@ endef
 # $(3) = boardname
 # $(4) = chipid
 # $(5) = imagename
-# $(6) = rsa signature
-# $(7) = additional options
+# $(6) = additional options
 define CfeImageDTB
   define Image/Build/$(5)
-$$(call Image/Build/CFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
+$$(call Image/Build/CFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6))
   endef
 
   TARGET_Default_DTBS += $(2)
@@ -214,11 +211,10 @@ endef
 # $(3) = boardname
 # $(4) = chipid
 # $(5) = imagename
-# $(6) = rsa signature
-# $(7) = additional options
+# $(6) = additional options
 define Spw303vCfeImageDTB
   define Image/Build/$(5)
-$$(call Image/Build/SPW303VCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
+$$(call Image/Build/SPW303VCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6))
   endef
 
   TARGET_Default_DTBS += $(2)
@@ -232,11 +228,10 @@ endef
 # $(3) = boardname
 # $(4) = chipid
 # $(5) = imagename
-# $(6) = rsa signature
-# $(7) = additional options
+# $(6) = additional options
 define ZyxCfeImageDTB
   define Image/Build/$(5)
-$$(call Image/Build/ZYXCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
+$$(call Image/Build/ZYXCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6))
   endef
 
   TARGET_Default_DTBS += $(2)
@@ -303,23 +298,23 @@ define Image/Build
 endef
 
 # Generic 963281TAN
-$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-4M-flash-generic,,--pad
 2))
-$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-8M-flash-generic,,--pad
 4))
-$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-16M-flash-generic,,--pad
 8))
+$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-4M-flash-generic,--pad
 2))
+$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-8M-flash-generic,--pad
 4))
+$(eval $(call 
CfeImageDTB,963281TAN,bcm963281TAN,963281TAN,6328,963281TAN-16M-flash-generic,--pad
 8))
 # Generic 96328avng
-$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-4M-flash-generic,,--pad
 2))
-$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-8M-flash-generic,,--pad
 4))
-$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-16M-flash-generic,,--pad
 8))
+$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-4M-flash-generic,--pad
 2))
+$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-8M-flash-generic,--pad
 4))
+$(eval $(call 
CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-16M-flash-generic,--pad
 8))
 # Generic 96338GW
 $(eval $(call CfeImageDTB,96338GW,bcm96338GW,6338GW,6338,96338GW-generic))
 # Generic 96338W
 $(eval $(call CfeImageDTB,96338W,bcm96338W,6338W,6338,96338W-generic))
 # Generic 96345GW2
 $(eval $(call CfeImageDTB,96345GW2,bcm96345GW2,96345GW2,6345,96345GW2-generic))