Re: [OpenWrt-Devel] [PATCH 1/4 v3] luci2: fix null pointer exception

2014-11-22 Thread Alexandru Ardelean
[quick idea/suggestion] What about just doing ? :

if (val == null)
   return;


On Sat, Nov 22, 2014 at 3:47 AM, Álvaro Fernández Rojas nolt...@gmail.com
wrote:

 This fixes system/system not properly loading due to themes being null.

 Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
 ---
 v3: follow conventions as stated by rmilecki
 v2: fix broken validation

 diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js
 index 040f1e5..a2f10af 100644
 --- a/luci2/htdocs/luci2/luci2.js
 +++ b/luci2/htdocs/luci2/luci2.js
 @@ -5190,17 +5190,20 @@ function LuCI2()
 {
 delete validation.message;

 -   if ((val.length == 0  !d.opt))
 -   {
 -   rv = d.self.setError($elem,
 L.tr('Field must not be empty'));
 -   }
 -   else if (val.length  0 
 !vstack[0].apply(val, vstack[1]))
 -   {
 -   rv = d.self.setError($elem,
 validation.message, vstack[1]);
 -   }
 -   else
 -   {
 -   rv = d.self.setError($elem);
 +   if (val != null)
 +   {
 +   if ((val.length == 0  !d.opt))
 +   {
 +   rv =
 d.self.setError($elem, L.tr('Field must not be empty'));
 +   }
 +   else if (val.length  0 
 !vstack[0].apply(val, vstack[1]))
 +   {
 +   rv =
 d.self.setError($elem, validation.message, vstack[1]);
 +   }
 +   else
 +   {
 +   rv =
 d.self.setError($elem);
 +   }
 }
 }

 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://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


Re: [OpenWrt-Devel] willing to donate a MTK MT7620A/MT7610E-based router to anyone who wants to work on one

2014-11-22 Thread Robert P. J. Day
On Fri, 21 Nov 2014, John Crispin wrote:

 Hi,

 why the mt7610 requirement ? whr works well with a rt5592 as 5ghz
 and the whr-1166 has mt7612 as 5ghz for which felix pushed the
 driver last night. mt7610 is only used by the dir810 and there is no
 free driver for that wifi chip.

  to repeat earlier question, can one build an openwrt image and flash
an out-of-the-box whr-1166d? i'm not even that obsessed with the
wireless part, i'm sure that won't be hard, what i most want is a
simple solution to basic board-up, just to build, flash and boot.

  has anyone actually *done* this with the whr-1166d? if so, i'll buy
one in a heartbeat.

rday

p.s. thanks for everyone's inestimable patience as i ask admittedly
silly questions on a regular basis. in return, i will be happy to
donate whatever helps the project along. if there's a developer that
needs a router somewhere, i'll be glad to help. or if there's a way to
donate directly, i can do that, too.
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 1/6] brcm63xx: Add DT support for AGPF-S0

2014-11-22 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
v2: fix naming issues

diff --git a/target/linux/brcm63xx/dts/agpf-s0.dts 
b/target/linux/brcm63xx/dts/agpf-s0.dts
new file mode 100644
index 000..9d66b89
--- /dev/null
+++ b/target/linux/brcm63xx/dts/agpf-s0.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ bcm6358.dtsi
+
+/ {
+   model = Pirelli Alice Gate AGPF-S0;
+   compatible = pirelli,agpf-s0, brcm,bcm6358;
+};
+
+pflash {
+   status = ok;
+
+   linux,part-probe = bcm63xxpart;
+
+   cfe@0 {
+   label = CFE;
+   reg = 0x00 0x02;
+   read-only;
+   };
+
+   linux@2 {
+   label = linux;
+   reg = 0x02 0xfc;
+   };
+
+   nvram@fe {
+   label = nvram;
+   reg = 0xfe 0x02;
+   };
+};
diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index b7789cf..2b57fcd 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -288,9 +288,6 @@ define Image/Build
$(call 
Image/Build/CFE,$(1),F@ST2704V2,6328,F@ST2704V2,OpenWRT-$(REVISION))
# Inventel Livebox
$(call Image/Build/RedBoot,livebox)
-   # Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
-   $(call Image/Build/CFEAGPF,$(1),AGPF-S0,6358,0x2,AGV2+W-cfe)
-   $(call Image/Build/CFEAGPF,$(1),AGPF-S0,6358,0x2,AGV2+W)
# Pirelli A226G
$(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x1,A226G-cfe)
$(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x1,A226G)
@@ -388,6 +385,8 @@ $(eval $(call 
CfeImageDTB,HG553,hg553,HW553,6358,HG553,EchoLife_HG553,--image-of
 $(eval $(call 
CfeImageDTB,HG556a_AB,hg556a-a,HW556,6358,HG556a_A,EchoLife_HG556a,--image-offset
 0x2 --block-size 0x1 --tag-version 8))
 $(eval $(call 
CfeImageDTB,HG556a_AB,hg556a-b,HW556,6358,HG556a_B,EchoLife_HG556a,--image-offset
 0x2 --block-size 0x2 --tag-version 8))
 $(eval $(call 
CfeImageDTB,HG556a_C,hg556a-c,HW556,6358,HG556a_C,EchoLife_HG556a,--image-offset
 0x2 --block-size 0x2 --tag-version 8))
+# Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
+$(eval $(call CfeImageDTB,AGPF_S0,agpf-s0,AGPF-S0,6358,AGV2+W,,--block-size 
0x2 --image-offset 0x2 --signature2 IMAGE --tag-version 8))
 # T-Com Speedport W 500V
 $(eval $(call CfeImageDTB,SPW500V,spw500v,96348GW,6348,SPW500V))
 # Tecom GW6000
diff --git a/target/linux/brcm63xx/profiles/pirelli.mk 
b/target/linux/brcm63xx/profiles/pirelli.mk
new file mode 100644
index 000..c06852e
--- /dev/null
+++ b/target/linux/brcm63xx/profiles/pirelli.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/AGPF_S0
+  NAME:=Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
+  PACKAGES:=kmod-b43 wpad-mini\
+   kmod-usb2 kmod-usb-ohci
+endef
+define Profile/AGPF_S0/Description
+  Package set optimized for AGPF-S0.
+endef
+$(eval $(call Profile,AGPF_S0))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 2/6] brcm63xx: Add DT support for A226G/M

2014-11-22 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
v2: add proper a226 variants

diff --git a/target/linux/brcm63xx/dts/a226g.dts 
b/target/linux/brcm63xx/dts/a226g.dts
new file mode 100644
index 000..9aff81b
--- /dev/null
+++ b/target/linux/brcm63xx/dts/a226g.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ bcm6358.dtsi
+
+/ {
+   model = Pirelli A226G;
+   compatible = pirelli,a226g, brcm,bcm6358;
+};
+
+pflash {
+   status = ok;
+
+   linux,part-probe = bcm63xxpart;
+
+   cfe@0 {
+   label = CFE;
+   reg = 0x00 0x01;
+   read-only;
+   };
+
+   linux@1 {
+   label = linux;
+   reg = 0x01 0x7e;
+   };
+
+   nvram@7f {
+   label = nvram;
+   reg = 0x7f 0x01;
+   };
+};
diff --git a/target/linux/brcm63xx/dts/a226m-fwb.dts 
b/target/linux/brcm63xx/dts/a226m-fwb.dts
new file mode 100644
index 000..1abf870
--- /dev/null
+++ b/target/linux/brcm63xx/dts/a226m-fwb.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ bcm6358.dtsi
+
+/ {
+   model = Pirelli A226M-FWB;
+   compatible = pirelli,a226m-fwb, brcm,bcm6358;
+};
+
+pflash {
+   status = ok;
+
+   linux,part-probe = bcm63xxpart;
+
+   cfe@0 {
+   label = CFE;
+   reg = 0x00 0x02;
+   read-only;
+   };
+
+   linux@2 {
+   label = linux;
+   reg = 0x02 0xfc;
+   };
+
+   nvram@fe {
+   label = nvram;
+   reg = 0xfe 0x02;
+   };
+};
diff --git a/target/linux/brcm63xx/dts/a226m.dts 
b/target/linux/brcm63xx/dts/a226m.dts
new file mode 100644
index 000..ba6382e
--- /dev/null
+++ b/target/linux/brcm63xx/dts/a226m.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ bcm6358.dtsi
+
+/ {
+   model = Pirelli A226M;
+   compatible = pirelli,a226m, brcm,bcm6358;
+};
+
+pflash {
+   status = ok;
+
+   linux,part-probe = bcm63xxpart;
+
+   cfe@0 {
+   label = CFE;
+   reg = 0x00 0x01;
+   read-only;
+   };
+
+   linux@1 {
+   label = linux;
+   reg = 0x01 0x7e;
+   };
+
+   nvram@7f {
+   label = nvram;
+   reg = 0x7f 0x01;
+   };
+};
diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index 2b57fcd..9f0227c 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -71,16 +71,6 @@ define Image/Build/ZYXCFEDTB
rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
 endef
 
-define Image/Build/CFEAGPF
-   # Generate the tagged image
-   $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f 
$(KDIR)/root.$(1) \
-   --output $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin \
-   --boardid $(2) --chipid $(3) --entry $(LOADADDR) \
-   --load-addr $(LOADADDR) --tag-version 8 \
-   --signature2 IMAGE --block-size 0x2 \
-   --image-offset $(4) --info1 -$(call Image/LimitName16,$(5)) 
--info2 $(1)
-endef
-
 define Image/Build/RG100A
# Generate the tagged image
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f 
$(KDIR)/root.$(1) \
@@ -288,13 +278,6 @@ define Image/Build
$(call 
Image/Build/CFE,$(1),F@ST2704V2,6328,F@ST2704V2,OpenWRT-$(REVISION))
# Inventel Livebox
$(call Image/Build/RedBoot,livebox)
-   # Pirelli A226G
-   $(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x1,A226G-cfe)
-   $(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x1,A226G)
-
-   # Pirelli A226M
-   $(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x2,A226M-cfe)
-   $(call Image/Build/CFEAGPF,$(1),DWV-S0,6358,0x2,A226M)
 
# RG100A,DB120 etc.
$(call Image/Build/RG100A,$(1),96358VW2,6358,0x2,RG100A_DB120)
@@ -387,6 +370,11 @@ $(eval $(call 
CfeImageDTB,HG556a_AB,hg556a-b,HW556,6358,HG556a_B,EchoLife_HG556a
 $(eval $(call 
CfeImageDTB,HG556a_C,hg556a-c,HW556,6358,HG556a_C,EchoLife_HG556a,--image-offset
 0x2 --block-size 0x2 --tag-version 8))
 # Pirelli Alice Gate VoIP 2 Plus Wi-Fi AGPF-S0
 $(eval $(call CfeImageDTB,AGPF_S0,agpf-s0,AGPF-S0,6358,AGV2+W,,--block-size 
0x2 --image-offset 0x2 --signature2 IMAGE --tag-version 8))
+# Pirelli A226G
+$(eval $(call CfeImageDTB,A226G,a226g,DWV-S0,6358,A226G,,--signature2 IMAGE 
--tag-version 8))
+# Pirelli A226M/A226M-FWB
+$(eval $(call CfeImageDTB,A226M,a226m,DWV-S0,6358,A226M,,--signature2 IMAGE 
--tag-version 8))
+$(eval $(call CfeImageDTB,A226M,a226m-fwb,DWV-S0,6358,A226M-FWB,,--block-size 
0x2 --image-offset 0x2 --signature2 IMAGE --tag-version 8))
 # T-Com Speedport W 500V
 $(eval $(call CfeImageDTB,SPW500V,spw500v,96348GW,6348,SPW500V))
 # Tecom GW6000
diff --git 

[OpenWrt-Devel] [PATCH v2 3/6] brcm63xx: Add DT support for RG100A

2014-11-22 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/dts/rg100a.dts 
b/target/linux/brcm63xx/dts/rg100a.dts
new file mode 100644
index 000..df628dc
--- /dev/null
+++ b/target/linux/brcm63xx/dts/rg100a.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ bcm6358.dtsi
+
+/ {
+   model = Alcatel RG100A;
+   compatible = alcatel,rg100a, brcm,bcm6358;
+};
+
+pflash {
+   status = ok;
+
+   linux,part-probe = bcm63xxpart;
+
+   cfe@0 {
+   label = CFE;
+   reg = 0x00 0x02;
+   read-only;
+   };
+
+   linux@2 {
+   label = linux;
+   reg = 0x02 0xfc;
+   };
+
+   nvram@fe {
+   label = nvram;
+   reg = 0xfe 0x02;
+   };
+};
diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index 9f0227c..89eefa3 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -71,15 +71,6 @@ define Image/Build/ZYXCFEDTB
rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
 endef
 
-define Image/Build/RG100A
-   # Generate the tagged image
-   $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f 
$(KDIR)/root.$(1) \
-   --output $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin \
-   --boardid $(2) --chipid $(3) --entry $(LOADADDR) \
-   --load-addr $(LOADADDR) --block-size 0x2 \
-   --image-offset $(4) --info1 -$(call Image/LimitName16,$(5)) 
--info2 $(1)
-endef
-
 define Image/Build/RedBoot
cp $(KDIR)/vmlinux.elf $(BIN_DIR)/openwrt-$(1)-vmlinux.elf
gzip -9 -c $(KDIR)/vmlinux  $(KDIR)/vmlinux.bin.gz
@@ -279,9 +270,6 @@ define Image/Build
# Inventel Livebox
$(call Image/Build/RedBoot,livebox)
 
-   # RG100A,DB120 etc.
-   $(call Image/Build/RG100A,$(1),96358VW2,6358,0x2,RG100A_DB120)
-
# Telsey CPVA642-type (e.g. CPA-ZNTE60T)
$(call Image/Build/CFE,$(1),CPVA642,6358,CPA-ZNTE60T,,--signature 
Telsey Tlc,--signature2 99.99.999,--second-image-flag 0)
 
@@ -336,6 +324,8 @@ $(eval $(call 
CfeImageDTB,96368MVWG,bcm96368MVWG,96368MVWG,6368,96368MVWG-generi
 $(eval $(call CfeImageDTB,A4001N,a4001n,96328dg2x2,6328,A4001N,,--pad 8))
 # ADB P.DG A4001N1
 $(eval $(call CfeImageDTB,A4001N1,a4001n1,963281T_TEF,6328,A4001N1,,--pad 8))
+# Alcatel RG100A
+$(eval $(call CfeImageDTB,RG100A,rg100a,96358VW2,6358,RG100A,,--block-size 
0x2 --image-offset 0x2))
 # Asmax AR 1004g
 $(eval $(call CfeImageDTB,AR1004G,ar1004g,96348GW-10,6348,AR1004G))
 # Comtrend AR-5381u
diff --git 
a/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
 
b/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
index 3ae3b94..765cf2a 100644
--- 
a/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
+++ 
b/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
@@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
 
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -736,6 +736,42 @@ static const struct board_info __initcon
+@@ -736,6 +736,43 @@ static const struct board_info __initcon
  };
  
  static struct of_device_id const bcm963xx_boards_dt[] = {
@@ -41,6 +41,7 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
 +  { .compatible = sagem,f@st2404, .data = board_FAST2404, },
 +#endif
 +#ifdef CONFIG_BCM63XX_CPU_6358
++  { .compatible = alcatel,rg100a, .data = board_96358vw2, },
 +  { .compatible = brcm,bcm96358vw, .data = board_96358vw, },
 +  { .compatible = brcm,bcm96358vw2, .data = board_96358vw2, },
 +  { .compatible = pirelli,a226g, .data = board_DWVS0, },
diff --git a/target/linux/brcm63xx/profiles/alcatel.mk 
b/target/linux/brcm63xx/profiles/alcatel.mk
new file mode 100644
index 000..ec93a19
--- /dev/null
+++ b/target/linux/brcm63xx/profiles/alcatel.mk
@@ -0,0 +1,16 @@
+#
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+define Profile/RG100A
+  NAME:=Alcatel RG100A
+  PACKAGES:=kmod-b43 wpad-mini\
+   kmod-usb2 kmod-usb-ohci
+endef
+define Profile/RG100A/Description
+  Package set optimized for RG100A.
+endef
+$(eval $(call Profile,RG100A))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH v2 4/6] brcm63xx: Add DT support for DV-201AMR

2014-11-22 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/dts/dv-201amr.dts 
b/target/linux/brcm63xx/dts/dv-201amr.dts
new file mode 100644
index 000..9f8660a
--- /dev/null
+++ b/target/linux/brcm63xx/dts/dv-201amr.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ bcm6348.dtsi
+
+/ {
+   model = Davolink DV-201AMR;
+   compatible = davolink,dv-201amr, brcm,bcm6348;
+};
+
+pflash {
+   status = ok;
+
+   linux,part-probe = bcm63xxpart;
+
+   backup@0 {
+   label = backup;
+   reg = 0x00 0x40;
+   };
+
+   cfe@40 {
+   label = cfe;
+   reg = 0x40 0x01;
+   read-only;
+   };
+
+   linux@41 {
+   label = linux;
+   reg = 0x41 0x3f;
+   };
+};
diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index 89eefa3..fc290c6 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -57,6 +57,13 @@ define Image/Build/CFEDTB
$(7) $(8) $(9) $(10)
 endef
 
+define Image/Build/OLDCFEDTB
+   $(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) \
+   -o $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin $(6)
+endef
+
 define Image/Build/ZYXCFEDTB
# Generate the tagged image
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f 
$(KDIR)/root.$(1) \
@@ -94,14 +101,6 @@ define Image/Build/SPW303V
rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp
 endef
 
-define Image/Build/CFEOLD
-   $(TOPDIR)/scripts/brcmImage.pl -t -p\
-   -b $(2) -c $(3) \
-   -k $(KDIR)/vmlinux.lzma.cfe \
-   -r $(KDIR)/root.$(1)\
-   -o $(BIN_DIR)/openwrt-$(2)-$(1)-cfe.bin
-endef
-
 define Image/Build/HCS
$(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_byte=$(3) \
--rev_maj=$(4) --rev_min=$(5) --input_file=$(6) \
@@ -198,6 +197,23 @@ endef
 # $(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) = rsa signature
 # $(7) = additional options
 define ZyxCfeImageDTB
@@ -237,8 +253,6 @@ define Image/Build
# Sagem F@ST2504n
$(call 
Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION))
 
-   # Davolink DV201AMR
-   $(call Image/Build/CFEOLD,$(1),DV201AMR,6348)
# USR 9108
$(call Image/Build/CFE,$(1),96348GW-A,6348,USR9108)
# NetGear DG834GT, DG834PN
@@ -350,6 +364,8 @@ $(eval $(call 
CfeImageDTB,DSL274XB_C,dsl-274xb-c,96358GW,6358,DSL274XB-C2))
 $(eval $(call CfeImageDTB,DSL274XB_C,dsl-274xb-c,AW4139,6358,DSL274XB-C3))
 # D-Link DVA-G3810BN/TL
 $(eval $(call CfeImageDTB,DVAG3810BN,dva-g3810bn_tl,96358VW,6358,DVAG3810BN))
+# Davolink DV-201AMR
+$(eval $(call OldCfeImageDTB,DV201AMR,dv-201amr,DV201AMR,6348,DV-201AMR))
 # Huawei HG520v
 $(eval $(call 
CfeImageDTB,HG520v,hg520v,HW6358GW_B,6358,HG520v,EchoLife_HG520v))
 # Huawei HG553
diff --git 
a/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
 
b/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
index 765cf2a..a602017 100644
--- 
a/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
+++ 
b/target/linux/brcm63xx/patches-3.14/369-MIPS-BCM63XX-populate-the-compatible-to-board_info-l.patch
@@ -14,7 +14,7 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
 
 --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
 +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
-@@ -736,6 +736,43 @@ static const struct board_info __initcon
+@@ -736,6 +736,44 @@ static const struct board_info __initcon
  };
  
  static struct of_device_id const bcm963xx_boards_dt[] = {
@@ -37,6 +37,7 @@ Signed-off-by: Jonas Gorski j...@openwrt.org
 +  { .compatible = brcm,bcm96348gw-10, .data = board_96348gw_10, },
 +  { .compatible = brcm,bcm96348gw-11, .data = board_96348gw_11, },
 +  { .compatible = brcm,bcm96348gw-a, .data = board_96348gw_a, },
++  { .compatible = davolink,dv-201amr, .data = board_DV201AMR, },
 +  { .compatible = dynalink,rta1025w, .data = board_rta1025w_16, },
 +  { .compatible = sagem,f@st2404, .data = board_FAST2404, },
 +#endif
diff --git a/target/linux/brcm63xx/patches-3.14/514-board_ct536_ct5621.patch 
b/target/linux/brcm63xx/patches-3.14/514-board_ct536_ct5621.patch
index 

[OpenWrt-Devel] [PATCH v2 5/6] brcm63xx: Add DT support for SPW303V

2014-11-22 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/dts/spw303v.dts 
b/target/linux/brcm63xx/dts/spw303v.dts
new file mode 100644
index 000..664ad7b
--- /dev/null
+++ b/target/linux/brcm63xx/dts/spw303v.dts
@@ -0,0 +1,30 @@
+/dts-v1/;
+
+/include/ bcm6358.dtsi
+
+/ {
+   model = T-Com Speedport W303 V;
+   compatible = t-com,spw303v, brcm,bcm6358;
+};
+
+pflash {
+   status = ok;
+
+   linux,part-probe = bcm63xxpart;
+
+   cfe@0 {
+   label = CFE;
+   reg = 0x00 0x01;
+   read-only;
+   };
+
+   linux@1 {
+   label = linux;
+   reg = 0x01 0x7e;
+   };
+
+   nvram@7f {
+   label = nvram;
+   reg = 0x7f 0x01;
+   };
+};
diff --git a/target/linux/brcm63xx/image/Makefile 
b/target/linux/brcm63xx/image/Makefile
index fc290c6..f82c864 100755
--- a/target/linux/brcm63xx/image/Makefile
+++ b/target/linux/brcm63xx/image/Makefile
@@ -64,6 +64,20 @@ define Image/Build/OLDCFEDTB
-o $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin $(6)
 endef
 
+define Image/Build/SPW303VCFEDTB
+   # Generate the tagged image
+   $(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)
+   # Fix up header
+   $(STAGING_DIR_HOST)/bin/spw303v -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \
+   -o $(BIN_DIR)/openwrt-$(5)-$(1)-cfe-sysupgrade.bin
+   $(STAGING_DIR_HOST)/bin/xorimage -i 
$(BIN_DIR)/openwrt-$(5)-$(1)-cfe-sysupgrade.bin \
+   -o $(BIN_DIR)/openwrt-$(5)-$(1)-cfe-factory.bin
+   rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp
+endef
+
 define Image/Build/ZYXCFEDTB
# Generate the tagged image
$(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux-$(2).lzma.cfe -f 
$(KDIR)/root.$(1) \
@@ -86,21 +100,6 @@ define Image/Build/RedBoot
dd if=$(KDIR)/vmlinux.bin.gz of=$(BIN_DIR)/openwrt-$(1)-vmlinux.gz 
bs=65536 conv=sync
 endef
 
-define Image/Build/SPW303V
-   # Generate the tagged image
-   $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f 
$(KDIR)/root.$(1) \
-   --output $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp \
-   --boardid $(2) --chipid $(3) --entry $(KERNEL_ENTRY) \
-   --load-addr $(LOADADDR) --rsa-signature $(5) \
-   --pad 4 $(6) $(7) $(8) $(9)
-   # Fix up header
-   $(STAGING_DIR_HOST)/bin/spw303v -i 
$(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp \
-   -o $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-sysupgrade.bin
-   $(STAGING_DIR_HOST)/bin/xorimage -i 
$(BIN_DIR)/openwrt-$(4)-$(1)-cfe-sysupgrade.bin \
-   -o $(BIN_DIR)/openwrt-$(4)-$(1)-cfe-factory.bin
-   rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp
-endef
-
 define Image/Build/HCS
$(STAGING_DIR_HOST)/bin/hcsmakeimage --magic_byte=$(3) \
--rev_maj=$(4) --rev_min=$(5) --input_file=$(6) \
@@ -216,6 +215,24 @@ endef
 # $(5) = imagename
 # $(6) = rsa signature
 # $(7) = additional options
+define Spw303vCfeImageDTB
+  define Image/Build/$(5)
+$$(call Image/Build/SPW303VCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
+  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) = rsa signature
+# $(7) = additional options
 define ZyxCfeImageDTB
   define Image/Build/$(5)
 $$(call Image/Build/ZYXCFEDTB,$$(1),$(2),$(3),$(4),$(5),$(6),$(7))
@@ -287,9 +304,6 @@ define Image/Build
# Telsey CPVA642-type (e.g. CPA-ZNTE60T)
$(call Image/Build/CFE,$(1),CPVA642,6358,CPA-ZNTE60T,,--signature 
Telsey Tlc,--signature2 99.99.999,--second-image-flag 0)
 
-   # T-Com Speedport W 303V Typ B
-   $(call Image/Build/SPW303V,$(1),96358-502V,6358,SPW303V)
-
# Netgear CVG834G
$(call Image/Build/HCS,$(1),cvg834g,a020,0001,0022,$(KDIR)/vmlinux)
 
@@ -381,6 +395,8 @@ $(eval $(call 
CfeImageDTB,A226G,a226g,DWV-S0,6358,A226G,,--signature2 IMAGE --ta
 # Pirelli A226M/A226M-FWB
 $(eval $(call CfeImageDTB,A226M,a226m,DWV-S0,6358,A226M,,--signature2 IMAGE 
--tag-version 8))
 $(eval $(call CfeImageDTB,A226M,a226m-fwb,DWV-S0,6358,A226M-FWB,,--block-size 
0x2 --image-offset 0x2 --signature2 IMAGE --tag-version 8))
+# T-Com Speedport W 303V Typ B
+$(eval $(call 
Spw303vCfeImageDTB,SPW303V,spw303v,96358-502V,6358,SPW303V,,--pad 4))
 # T-Com Speedport W 500V
 $(eval $(call CfeImageDTB,SPW500V,spw500v,96348GW,6348,SPW500V))
 # Tecom GW6000
diff --git a/target/linux/brcm63xx/patches-3.14/510-board_spw303v.patch 
b/target/linux/brcm63xx/patches-3.14/510-board_spw303v.patch
index 

[OpenWrt-Devel] [PATCH 6/6] brcm63xx: refresh patches

2014-11-22 Thread Álvaro Fernández Rojas
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com
---
diff --git a/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch 
b/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch
index f028de8..e1eecd4 100644
--- a/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch
+++ b/target/linux/brcm63xx/patches-3.14/501-board-NB4.patch
@@ -304,9 +304,9 @@
  #endif
  };
  
-@@ -815,6 +1091,8 @@ static struct of_device_id const bcm963x
-   { .compatible = pirelli,a226g, .data = board_DWVS0, },
+@@ -818,6 +1094,8 @@ static struct of_device_id const bcm963x
{ .compatible = pirelli,a226m, .data = board_DWVS0, },
+   { .compatible = pirelli,a226m-fwb, .data = board_DWVS0, },
{ .compatible = pirelli,agpf-s0, .data = board_AGPFS0, },
 +  { .compatible = sfr,nb4-ser-r0, .data = board_nb4_ser_r0, },
 +  { .compatible = sfr,nb4-fxc-r1, .data = board_nb4_fxc_r1, },
diff --git a/target/linux/brcm63xx/patches-3.14/504-board_dsl_274xb_rev_c.patch 
b/target/linux/brcm63xx/patches-3.14/504-board_dsl_274xb_rev_c.patch
index c20dd19..791db69 100644
--- a/target/linux/brcm63xx/patches-3.14/504-board_dsl_274xb_rev_c.patch
+++ b/target/linux/brcm63xx/patches-3.14/504-board_dsl_274xb_rev_c.patch
@@ -70,11 +70,11 @@
board_nb4_ser_r0,
board_nb4_fxc_r1,
  #endif
-@@ -1216,6 +1272,7 @@ static struct of_device_id const bcm963x
- #ifdef CONFIG_BCM63XX_CPU_6358
+@@ -1218,6 +1274,7 @@ static struct of_device_id const bcm963x
+   { .compatible = alcatel,rg100a, .data = board_96358vw2, },
{ .compatible = brcm,bcm96358vw, .data = board_96358vw, },
{ .compatible = brcm,bcm96358vw2, .data = board_96358vw2, },
 +  { .compatible = d-link,dsl-274xb-c2, .data = board_dsl_274xb_rev_c, 
},
{ .compatible = pirelli,a226g, .data = board_DWVS0, },
{ .compatible = pirelli,a226m, .data = board_DWVS0, },
-   { .compatible = pirelli,agpf-s0, .data = board_AGPFS0, },
+   { .compatible = pirelli,a226m-fwb, .data = board_DWVS0, },
diff --git a/target/linux/brcm63xx/patches-3.14/505-board_spw500v.patch 
b/target/linux/brcm63xx/patches-3.14/505-board_spw500v.patch
index 9743cd6..1d153c8 100644
--- a/target/linux/brcm63xx/patches-3.14/505-board_spw500v.patch
+++ b/target/linux/brcm63xx/patches-3.14/505-board_spw500v.patch
@@ -93,11 +93,11 @@
  #endif
  
  #ifdef CONFIG_BCM63XX_CPU_6358
-@@ -1268,6 +1347,7 @@ static struct of_device_id const bcm963x
-   { .compatible = brcm,bcm96348gw-a, .data = board_96348gw_a, },
+@@ -1269,6 +1348,7 @@ static struct of_device_id const bcm963x
+   { .compatible = davolink,dv-201amr, .data = board_DV201AMR, },
{ .compatible = dynalink,rta1025w, .data = board_rta1025w_16, },
{ .compatible = sagem,f@st2404, .data = board_FAST2404, },
 +  { .compatible = t-com,spw500v, .data = board_spw500v, },
  #endif
  #ifdef CONFIG_BCM63XX_CPU_6358
-   { .compatible = brcm,bcm96358vw, .data = board_96358vw, },
+   { .compatible = alcatel,rg100a, .data = board_96358vw2, },
diff --git a/target/linux/brcm63xx/patches-3.14/506-board_gw6200_gw6000.patch 
b/target/linux/brcm63xx/patches-3.14/506-board_gw6200_gw6000.patch
index 70226a7..27fa19d 100644
--- a/target/linux/brcm63xx/patches-3.14/506-board_gw6200_gw6000.patch
+++ b/target/linux/brcm63xx/patches-3.14/506-board_gw6200_gw6000.patch
@@ -122,7 +122,7 @@
board_96348gw_10,
board_96348gw_11,
board_FAST2404,
-@@ -1348,6 +1456,8 @@ static struct of_device_id const bcm963x
+@@ -1349,6 +1457,8 @@ static struct of_device_id const bcm963x
{ .compatible = dynalink,rta1025w, .data = board_rta1025w_16, },
{ .compatible = sagem,f@st2404, .data = board_FAST2404, },
{ .compatible = t-com,spw500v, .data = board_spw500v, },
@@ -130,4 +130,4 @@
 +  { .compatible = tecom,gw6200, .data = board_gw6200, },
  #endif
  #ifdef CONFIG_BCM63XX_CPU_6358
-   { .compatible = brcm,bcm96358vw, .data = board_96358vw, },
+   { .compatible = alcatel,rg100a, .data = board_96358vw2, },
diff --git a/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch 
b/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch
index 7dcd101..f45371e 100644
--- a/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch
+++ b/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch
@@ -92,11 +92,11 @@
  #endif
  };
  
-@@ -1536,6 +1614,7 @@ static struct of_device_id const bcm963x
+@@ -1538,6 +1616,7 @@ static struct of_device_id const bcm963x
{ .compatible = brcm,bcm96358vw, .data = board_96358vw, },
{ .compatible = brcm,bcm96358vw2, .data = board_96358vw2, },
{ .compatible = d-link,dsl-274xb-c2, .data = board_dsl_274xb_rev_c, 
},
 +  { .compatible = huawei,hg553, .data = board_HW553, },
{ .compatible = pirelli,a226g, .data = board_DWVS0, },
{ .compatible = pirelli,a226m, .data = board_DWVS0, },
-   { .compatible = pirelli,agpf-s0, .data = board_AGPFS0, },
+   { .compatible = pirelli,a226m-fwb, .data =