Re: [OpenWrt-Devel] [PATCH] because -e xx , only export one value. I try to get all value by one call. So I add '; ' in -e parameters.
Hi Liu Bo, was there any particular reason why you couldn't use multiple -e arguments? That should produce the very same results without using ; jsonfilter -s '{a:b,e:{a:c}}' -e t=$['a'] -e y=$['e']['a'] export t='b'; export y='c'; ~ Jow ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] dnsmasq 2.71 dies silently (hangs) / how to debug
sometimes dnsmasq 2.71 (trunk) dies silently but the process is still running. when sending: kill -SIGSEGV $PID there is no coredump but the daemon gets restarted (via procd?) normally inserting 'ulimit -c unlimited' just before starting the daemon should be enough, but i'am unsure how to apply, because there is some procd-magic involved. any hints? bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] dnsmasq 2.71 dies silently (hangs) / how to debug
On 19 August 2014 12:10, Bastian Bittorf bitt...@bluebottle.com wrote: sometimes dnsmasq 2.71 (trunk) dies silently but the process is still running. when sending: kill -SIGSEGV $PID there is no coredump but the daemon gets restarted (via procd?) normally inserting 'ulimit -c unlimited' just before starting the daemon should be enough, but i'am unsure how to apply, because there is some procd-magic involved. any hints? I've noticed this yesterday too. Seems this has something to do both with procd and ipcalc.sh (because dhcp-range string had invalid ip addresses, like 0.0.0.100, in /tmp/etc/dnsmasq.conf). I was able to get it working after fixing the /tmp/etc/dnsmasq.conf and setting USE_PROCD=0 in /etc/init.d/dnsmasq Didn't have much time to debug further. Regards, Roman ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] dnsmasq 2.71 dies silently (hangs) / how to debug
Hi Bastian, you should try: procd_set_param limits core=unlimited Cheers, Steven ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] kirkwood / howto make bootloader
under http://downloads.openwrt.org/barrier_breaker/14.07-rc3/kirkwood/generic/uboot-kirkwood-goflexhome/ i can see the kwb-files, but how can i build them? (when building generic or a subtarget they will not show up) bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] dnsmasq 2.71 dies silently (hangs) / how to debug
* Steven Barth cy...@openwrt.org [19.08.2014 12:49]: procd_set_param limits core=unlimited thanks, this works fine here when the 'root' part of dnsmasq gets a -SIGSEGV (or during a real crash) and produces coredumps. i will keep the list updated, when i catch a real hang. bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/12] brcm63xx: Add DT support for CT-5365
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/ct-5365.dts b/target/linux/brcm63xx/dts/ct-5365.dts new file mode 100644 index 000..6e90638 --- /dev/null +++ b/target/linux/brcm63xx/dts/ct-5365.dts @@ -0,0 +1,31 @@ +/dts-v1/; + +/include/ bcm6348.dtsi + +/ { + model = Comtrend CT-5365; + compatible = comtrend,ct-5365, brcm,bcm6348; +}; + +pflash { + status = ok; + + linux,part-probe = bcm63xxpart; + + cfe@0 { + label = CFE; + reg = 0x00 0x01; + read-only; + }; + + linux@1 { + label = linux; + reg = 0x01 0x3e; + read-only; + }; + + nvram@3f { + label = nvram; + reg = 0x3f 0x01; + }; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index ac64467..487d674 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -238,7 +238,6 @@ define Image/Build $(call Image/Build/CFE,$(1),6338W,6338,6338W-generic,,) $(call Image/Build/CFE,$(1),96348GW-11,6348,96348GW-11-generic) $(call Image/Build/CFE,$(1),96348GW-10,6348,96348GW-10-generic) - $(call Image/Build/CFE,$(1),96348A-122,6348,96348A-122-generic) $(call Image/Build/CFE,$(1),96358VW,6358,96358VW-generic) $(call Image/Build/CFE,$(1),96358VW2,6358,96358VW2-generic) $(call Image/Build/CFE,$(1),96368MVNgr,6368,96368MVNgr-generic) @@ -362,6 +361,8 @@ $(eval $(call CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-16M-fl $(eval $(call CfeImageDTB,AR1004G,ar1004g,96348GW-10,6348,AR1004G)) # Comtrend 536, 5621 $(eval $(call CfeImageDTB,CT536_CT5621,ct536plus,96348GW-11,6348,CT536_CT5621)) +# Comtrend CT-5365 +$(eval $(call CfeImageDTB,CT5365,ct-5365,96348A-122,6348,CT-5365)) # D-Link DSL-2740B/DSL-2741B, rev C2 $(eval $(call CfeImageDTB,DSL274XB_C,dsl-274xb-c,96358GW,6358,DSL274XB-C2)) # D-Link DSL-2740B/DSL-2741B, rev C3 diff --git a/target/linux/brcm63xx/patches-3.14/516-board_96348A-122.patch b/target/linux/brcm63xx/patches-3.14/516-board_96348A-122.patch index 398e4a8..cc26907 100644 --- a/target/linux/brcm63xx/patches-3.14/516-board_96348A-122.patch +++ b/target/linux/brcm63xx/patches-3.14/516-board_96348A-122.patch @@ -1,11 +1,12 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -592,6 +592,76 @@ static struct board_info __initdata boar +@@ -592,6 +592,77 @@ static struct board_info __initdata boar }, }; +static struct board_info __initdata board_96348A_122 = { + .name = 96348A-122, ++ .of_board_id= comtrend,ct-5365, + .expected_cpu_id= 0x6348, + + .has_uart0 = 1, @@ -77,7 +78,7 @@ static struct board_info __initdata board_96348gw = { .name = 96348GW, .of_board_id= brcm,bcm96348gw, -@@ -1864,6 +1934,7 @@ static const struct board_info __initcon +@@ -1864,6 +1935,7 @@ static const struct board_info __initcon board_V2500V_BB, board_V2110, board_ct536_ct5621, diff --git a/target/linux/brcm63xx/patches-3.14/517-RTA1205W_16_uart_fixes.patch b/target/linux/brcm63xx/patches-3.14/517-RTA1205W_16_uart_fixes.patch index f308890..1a2dda7 100644 --- a/target/linux/brcm63xx/patches-3.14/517-RTA1205W_16_uart_fixes.patch +++ b/target/linux/brcm63xx/patches-3.14/517-RTA1205W_16_uart_fixes.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -871,6 +871,7 @@ static struct board_info __initdata boar +@@ -872,6 +872,7 @@ static struct board_info __initdata boar .of_board_id= dynalink,rta1025w, .expected_cpu_id= 0x6348, diff --git a/target/linux/brcm63xx/patches-3.14/519_board_CPVA502plus.patch b/target/linux/brcm63xx/patches-3.14/519_board_CPVA502plus.patch index 26989af..55d1b98 100644 --- a/target/linux/brcm63xx/patches-3.14/519_board_CPVA502plus.patch +++ b/target/linux/brcm63xx/patches-3.14/519_board_CPVA502plus.patch @@ -41,7 +41,7 @@ static struct board_info __initdata board_ct536_ct5621 = { .name = CT536_CT5621, -@@ -1936,6 +1970,7 @@ static const struct board_info __initcon +@@ -1937,6 +1971,7 @@ static const struct board_info __initcon board_V2110, board_ct536_ct5621, board_96348A_122, diff --git a/target/linux/brcm63xx/patches-3.14/520-bcm63xx-add-support-for-96368MVWG-board.patch b/target/linux/brcm63xx/patches-3.14/520-bcm63xx-add-support-for-96368MVWG-board.patch index b83d564..59075d4 100644 --- a/target/linux/brcm63xx/patches-3.14/520-bcm63xx-add-support-for-96368MVWG-board.patch +++
[OpenWrt-Devel] [PATCH 3/12] brcm63xx: Add DT support for AR-5381u
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/ar-5381u.dts b/target/linux/brcm63xx/dts/ar-5381u.dts new file mode 100644 index 000..812108a --- /dev/null +++ b/target/linux/brcm63xx/dts/ar-5381u.dts @@ -0,0 +1,8 @@ +/dts-v1/; + +/include/ bcm6328.dtsi + +/ { + model = Comtrend AR-5381u; + compatible = comtrend,ar-5381u, brcm,bcm6328; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index f3782ee..3050d2c 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -271,8 +271,6 @@ define Image/Build # Sagem F@ST2504n $(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION)) - # Comtrend AR-5381u - $(call Image/Build/CFE,$(1),96328A-1241N,6328,AR-5381u,,--pad 8) # Comtrend AR-5387un $(call Image/Build/CFE,$(1),96328A-1441N1,6328,AR-5387un,,--pad 8) # Comtrend VR-3025u @@ -357,6 +355,8 @@ $(eval $(call CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-16M-fl # Asmax AR 1004g $(eval $(call CfeImageDTB,AR1004G,ar1004g,96348GW-10,6348,AR1004G)) +# Comtrend AR-5381u +$(eval $(call CfeImageDTB,AR5381u,ar-5381u,96328A-1241N,6328,AR-5381u,,--pad 8)) # Comtrend 536, 5621 $(eval $(call CfeImageDTB,CT536_CT5621,ct536plus,96348GW-11,6348,CT536_CT5621)) # Comtrend CT-5365 diff --git a/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch b/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch index 118af0e..ada24ff 100644 --- a/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch +++ b/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -166,6 +166,91 @@ static struct board_info __initdata boar +@@ -166,6 +166,92 @@ static struct board_info __initdata boar }, }; @@ -15,6 +15,7 @@ + +static struct board_info __initdata board_AR5381u = { + .name = 96328A-1241N, ++ .of_board_id= comtrend,ar-5381u, + .expected_cpu_id= 0x6328, + + .has_uart0 = 1, @@ -92,7 +93,7 @@ static struct sprom_fixup __initdata ar5387un_fixups[] = { { .offset = 2, .value = 0x05bb }, { .offset = 65, .value = 0x1204 }, -@@ -2930,6 +3015,7 @@ static const struct board_info __initcon +@@ -2930,6 +3016,7 @@ static const struct board_info __initcon #endif #ifdef CONFIG_BCM63XX_CPU_6328 board_96328avng, diff --git a/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch b/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch index 64ca2cd..cc650d9 100644 --- a/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch +++ b/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -838,6 +838,55 @@ static struct board_info __initdata boar +@@ -839,6 +839,55 @@ static struct board_info __initdata boar .has_uart0 = 1, }; @@ -56,7 +56,7 @@ #endif /* CONFIG_BCM63XX_CPU_6345 */ /* -@@ -3029,6 +3078,7 @@ static const struct board_info __initcon +@@ -3030,6 +3079,7 @@ static const struct board_info __initcon #endif #ifdef CONFIG_BCM63XX_CPU_6345 board_96345gw2, diff --git a/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch b/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch index 29f3d7c..d0f7ef9 100644 --- a/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch +++ b/target/linux/brcm63xx/patches-3.14/534-board_hw556.patch @@ -8,7 +8,7 @@ #include linux/platform_device.h #include linux/spi/spi.h #include linux/spi/spi_gpio.h -@@ -2676,6 +2677,405 @@ static struct board_info __initdata boar +@@ -2677,6 +2678,405 @@ static struct board_info __initdata boar }, }; @@ -414,7 +414,7 @@ /* T-Home Speedport W 303V Typ B */ static struct board_info __initdata board_spw303v = { .name = 96358-502V, -@@ -3114,6 +3514,9 @@ static const struct board_info __initcon +@@ -3115,6 +3515,9 @@ static const struct board_info __initcon board_nb4_fxc_r1, board_ct6373_1, board_HW553, diff --git a/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch b/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch index b22334a..01da5fb 100644 --- a/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch +++ b/target/linux/brcm63xx/patches-3.14/535-board_rta770w.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -888,6 +888,60 @@ static struct board_info __initdata boar +@@ -889,6 +889,60 @@ static struct board_info __initdata boar }, }, }; @@ -61,7 +61,7
[OpenWrt-Devel] [PATCH 5/12] brcm63xx: Add DT support for VR-3025u
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/vr-3025u.dts b/target/linux/brcm63xx/dts/vr-3025u.dts new file mode 100644 index 000..f36ba96 --- /dev/null +++ b/target/linux/brcm63xx/dts/vr-3025u.dts @@ -0,0 +1,31 @@ +/dts-v1/; + +/include/ bcm6368.dtsi + +/ { + model = Comtrend VR-3025u; + compatible = comtrend,vr-3025u, brcm,bcm6368; +}; + +pflash { + status = ok; + + linux,part-probe = bcm63xxpart; + + cfe@0 { + label = CFE; + reg = 0x000 0x002; + read-only; + }; + + linux@2 { + label = linux; + reg = 0x002 0x1fc; + read-only; + }; + + nvram@1fe { + label = nvram; + reg = 0x1fe 0x02; + }; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index a04709a..fc75978 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -271,8 +271,6 @@ define Image/Build # Sagem F@ST2504n $(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION)) - # Comtrend VR-3025u - $(call Image/Build/CFE,$(1),96368M-1541N,6368,VR-3025u,,--pad 16) # Comtrend VR-3025un $(call Image/Build/CFE,$(1),96368M-1341N,6368,VR-3025un,,--pad 4) # Comtrend WAP-5813n @@ -363,6 +361,8 @@ $(eval $(call CfeImageDTB,CT536_CT5621,ct536plus,96348GW-11,6348,CT536_CT5621)) $(eval $(call CfeImageDTB,CT5365,ct-5365,96348A-122,6348,CT-5365)) # Comtrend CT-6373 $(eval $(call CfeImageDTB,CT6373,ct-6373,CT6373-1,6358,CT-6373)) +# Comtrend VR-3025u +$(eval $(call CfeImageDTB,VR3025u,vr-3025u,96368M-1541N,6368,VR-3025u,,--pad 16 --image-offset 0x2 --block-size 0x2)) # D-Link DSL-2740B/DSL-2741B, rev C2 $(eval $(call CfeImageDTB,DSL274XB_C,dsl-274xb-c,96358GW,6358,DSL274XB-C2)) # D-Link DSL-2740B/DSL-2741B, rev C3 diff --git a/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch b/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch index 9bf57b9..25b7123 100644 --- a/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch +++ b/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -4169,6 +4169,116 @@ static struct board_info __initdata boar +@@ -4169,6 +4169,117 @@ static struct board_info __initdata boar .has_ehci0 = 1, }; @@ -15,6 +15,7 @@ + +static struct board_info __initdata board_VR3025u = { + .name = 96368M-1541N, ++ .of_board_id= comtrend,vr-3025u, + .expected_cpu_id= 0x6368, + + .has_uart0 = 1, @@ -117,7 +118,7 @@ static struct b53_platform_data WAP5813n_b53_pdata = { .alias = eth0, }; -@@ -4658,6 +4768,7 @@ static const struct board_info __initcon +@@ -4658,6 +4769,7 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6368 board_96368mvwg, board_96368mvngr, diff --git a/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch b/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch index bb7597a..5b18b72 100644 --- a/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch +++ b/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -4279,6 +4279,116 @@ static struct board_info __initdata boar +@@ -4280,6 +4280,116 @@ static struct board_info __initdata boar }, }; @@ -117,7 +117,7 @@ static struct b53_platform_data WAP5813n_b53_pdata = { .alias = eth0, }; -@@ -4769,6 +4879,7 @@ static const struct board_info __initcon +@@ -4770,6 +4880,7 @@ static const struct board_info __initcon board_96368mvwg, board_96368mvngr, board_VR3025u, diff --git a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch index 4aefa33..3ee2dd5 100644 --- a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch +++ b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch @@ -96,8 +96,8 @@ + static struct board_info __initdata board_VR3025u = { .name = 96368M-1541N, - .expected_cpu_id= 0x6368, -@@ -4878,6 +4968,7 @@ static const struct board_info __initcon + .of_board_id= comtrend,vr-3025u, +@@ -4879,6 +4969,7 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6368 board_96368mvwg, board_96368mvngr, diff --git a/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch b/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch
[OpenWrt-Devel] [PATCH 8/12] brcm63xx: Add DT support for A4001N1
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/a4001n1.dts b/target/linux/brcm63xx/dts/a4001n1.dts new file mode 100644 index 000..2bdd201 --- /dev/null +++ b/target/linux/brcm63xx/dts/a4001n1.dts @@ -0,0 +1,8 @@ +/dts-v1/; + +/include/ bcm6328.dtsi + +/ { + model = ADB P.DG A4001N1; + compatible = adb,a4001n1, brcm,bcm6328; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index 137cc73..31dd399 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -245,8 +245,6 @@ define Image/Build # ADB P.DG A4001N $(call Image/Build/CFE,$(1),96328dg2x2,6328,A4001N,,--pad 4) - # ADB P.DG A4001N1 - $(call Image/Build/CFE,$(1),963281T_TEF,6328,A4001N1,,--pad 8) # BT Voyager V210_BTR $(call Image/Build/CFE,$(1),V210_BB,6348,BTV210_BTR,,--layoutver 5) # BT Voyager V210_ROI, V210_WB @@ -345,6 +343,8 @@ $(eval $(call CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-4M-fla $(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)) +# ADB P.DG A4001N1 +$(eval $(call CfeImageDTB,A4001N1,a4001n1,963281T_TEF,6328,A4001N1,,--pad 8)) # Asmax AR 1004g $(eval $(call CfeImageDTB,AR1004G,ar1004g,96348GW-10,6348,AR1004G)) # Comtrend AR-5381u diff --git a/target/linux/brcm63xx/patches-3.14/530-board_A4001N1.patch b/target/linux/brcm63xx/patches-3.14/530-board_A4001N1.patch index 45ceec3..272ee64 100644 --- a/target/linux/brcm63xx/patches-3.14/530-board_A4001N1.patch +++ b/target/linux/brcm63xx/patches-3.14/530-board_A4001N1.patch @@ -1,11 +1,12 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -236,6 +236,133 @@ static struct board_info __initdata boar +@@ -236,6 +236,134 @@ static struct board_info __initdata boar }, }; +static struct board_info __initdata board_A4001N1 = { + .name = 963281T_TEF, ++ .of_board_id= adb,a4001n1, + .expected_cpu_id= 0x6328, + + .has_uart0 = 1, @@ -134,7 +135,7 @@ static struct board_info __initdata board_dsl_274xb_f1 = { .name = AW4339U, .expected_cpu_id= 0x6328, -@@ -2695,6 +2822,7 @@ static const struct board_info __initcon +@@ -2695,6 +2823,7 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6328 board_96328avng, board_963281TAN, diff --git a/target/linux/brcm63xx/patches-3.14/531-board_AR-5387un.patch b/target/linux/brcm63xx/patches-3.14/531-board_AR-5387un.patch index 128354e..1ed660d 100644 --- a/target/linux/brcm63xx/patches-3.14/531-board_AR-5387un.patch +++ b/target/linux/brcm63xx/patches-3.14/531-board_AR-5387un.patch @@ -117,7 +117,7 @@ static struct board_info __initdata board_963281TAN = { .name = 963281TAN, .expected_cpu_id= 0x6328, -@@ -2821,6 +2931,7 @@ static const struct board_info __initcon +@@ -2822,6 +2932,7 @@ static const struct board_info __initcon #endif #ifdef CONFIG_BCM63XX_CPU_6328 board_96328avng, diff --git a/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch b/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch index f690bc5..93c83af 100644 --- a/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch +++ b/target/linux/brcm63xx/patches-3.14/532-board_AR-5381u.patch @@ -93,7 +93,7 @@ static struct sprom_fixup __initdata ar5387un_fixups[] = { { .offset = 2, .value = 0x05bb }, { .offset = 65, .value = 0x1204 }, -@@ -2931,6 +3017,7 @@ static const struct board_info __initcon +@@ -2932,6 +3018,7 @@ static const struct board_info __initcon #endif #ifdef CONFIG_BCM63XX_CPU_6328 board_96328avng, diff --git a/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch b/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch index 1d1a45c..4e46193 100644 --- a/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch +++ b/target/linux/brcm63xx/patches-3.14/533-board_rta770bw.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -840,6 +840,55 @@ static struct board_info __initdata boar +@@ -841,6 +841,55 @@ static struct board_info __initdata boar .has_uart0 = 1, }; @@ -56,7 +56,7 @@ #endif /* CONFIG_BCM63XX_CPU_6345 */ /* -@@ -3031,6 +3080,7 @@ static const struct board_info __initcon +@@ -3032,6 +3081,7 @@ static const struct board_info __initcon #endif #ifdef CONFIG_BCM63XX_CPU_6345 board_96345gw2, diff --git
[OpenWrt-Devel] [PATCH 9/12] brcm63xx: Add DT support for A4001N
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/a4001n.dts b/target/linux/brcm63xx/dts/a4001n.dts new file mode 100644 index 000..011fbf4 --- /dev/null +++ b/target/linux/brcm63xx/dts/a4001n.dts @@ -0,0 +1,8 @@ +/dts-v1/; + +/include/ bcm6328.dtsi + +/ { + model = ADB P.DG A4001N; + compatible = adb,a4001n, brcm,bcm6328; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index 31dd399..009c34e 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -243,8 +243,6 @@ define Image/Build $(call Image/Build/CFE,$(1),96368MVNgr,6368,96368MVNgr-generic) $(call Image/Build/CFE,$(1),96368MVWG,6368,96368MVWG-generic) - # ADB P.DG A4001N - $(call Image/Build/CFE,$(1),96328dg2x2,6328,A4001N,,--pad 4) # BT Voyager V210_BTR $(call Image/Build/CFE,$(1),V210_BB,6348,BTV210_BTR,,--layoutver 5) # BT Voyager V210_ROI, V210_WB @@ -343,6 +341,8 @@ $(eval $(call CfeImageDTB,96328avng,bcm96328avng,96328avng,6328,96328avng-4M-fla $(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)) +# ADB P.DG A4001N +$(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)) # Asmax AR 1004g diff --git a/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch b/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch index ee5cf9a..ed5aa03 100644 --- a/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch +++ b/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch @@ -1,11 +1,12 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -609,6 +609,95 @@ static struct board_info __initdata boar +@@ -609,6 +609,96 @@ static struct board_info __initdata boar }, }; +static struct board_info __initdata board_A4001N = { + .name = 96328dg2x2, ++ .of_board_id= adb,a4001n, + .expected_cpu_id= 0x6328, + + .has_uart0 = 1, @@ -95,8 +96,8 @@ + static struct board_info __initdata board_A4001N1 = { .name = 963281T_TEF, - .of_board_id= comtrend,wap-5813n, -@@ -4957,6 +5046,7 @@ static const struct board_info __initcon + .of_board_id= adb,a4001n1, +@@ -4957,6 +5047,7 @@ static const struct board_info __initcon board_AR5381u, board_AR5387un, board_963281TAN, diff --git a/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch b/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch index 80fe15c..6cc28ea 100644 --- a/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch +++ b/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch @@ -142,7 +142,7 @@ #endif /* CONFIG_BCM63XX_CPU_6318 */ /* -@@ -5040,6 +5175,7 @@ static const struct board_info __initcon +@@ -5041,6 +5176,7 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6318 board_96318ref, board_96318ref_p300, diff --git a/target/linux/brcm63xx/profiles/adb.mk b/target/linux/brcm63xx/profiles/adb.mk index 864224c..13c7524 100644 --- a/target/linux/brcm63xx/profiles/adb.mk +++ b/target/linux/brcm63xx/profiles/adb.mk @@ -5,6 +5,16 @@ # See /LICENSE for more information. # +define Profile/A4001N + NAME:=ADB P.DG A4001N + PACKAGES:=kmod-b43 wpad-mini \ + kmod-usb2 kmod-usb-ohci +endef +define Profile/A4001N/Description + Package set optimized for A4001N. +endef +$(eval $(call Profile,A4001N)) + define Profile/A4001N1 NAME:=ADB P.DG A4001N1 PACKAGES:=kmod-b43 wpad-mini \ ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 10/12] brcm63xx: Add DT support for HG520v
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/hg520v.dts b/target/linux/brcm63xx/dts/hg520v.dts new file mode 100644 index 000..08dd711 --- /dev/null +++ b/target/linux/brcm63xx/dts/hg520v.dts @@ -0,0 +1,30 @@ +/dts-v1/; + +/include/ bcm6358.dtsi + +/ { + model = Huawei EchoLife HG520v; + compatible = huawei,hg520v, brcm,bcm6358; +}; + +pflash { + status = ok; + + linux,part-probe = bcm63xxpart; + + cfe@0 { + label = CFE; + reg = 0x00 0x01; + read-only; + }; + + linux@1 { + label = linux; + reg = 0x01 0x3e; + }; + + nvram@3e { + label = nvram; + reg = 0x3e 0x01; + }; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index 009c34e..5b3e06c 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -316,9 +316,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) - # Huawei HW520 - $(call Image/Build/CFE,$(1),HW6358GW_B,6358,HW520,EchoLife_HG520v) - #HW553 $(call Image/Build/CFEHW553,$(1),HW553,6358,0x2,HW553) @@ -369,6 +366,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)) +# Huawei HG520v +$(eval $(call CfeImageDTB,HG520v,hg520v,HW6358GW_B,6358,HG520v,EchoLife_HG520v)) # Huawei HG556a $(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)) diff --git a/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch b/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch index eb90bcc..eb59a40 100644 --- a/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch +++ b/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch @@ -1,11 +1,12 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -3226,6 +3226,56 @@ static struct board_info __initdata boar +@@ -3226,6 +3226,57 @@ static struct board_info __initdata boar .num_spis = ARRAY_SIZE(ct6373_spi_devices), }; +static struct board_info __initdata board_HW520 = { + .name = HW6358GW_B, ++ .of_board_id= huawei,hg520v, + .expected_cpu_id= 0x6358, + + .has_uart0 = 1, @@ -57,7 +58,7 @@ static struct board_info __initdata board_HW553 = { .name = HW553, .expected_cpu_id= 0x6358, -@@ -4956,6 +5006,7 @@ static const struct board_info __initcon +@@ -4956,6 +5007,7 @@ static const struct board_info __initcon board_nb4_ser_r0, board_nb4_fxc_r1, board_ct6373_1, diff --git a/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch b/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch index ed5aa03..7846aef 100644 --- a/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch +++ b/target/linux/brcm63xx/patches-3.14/566-board_A4001N.patch @@ -97,7 +97,7 @@ static struct board_info __initdata board_A4001N1 = { .name = 963281T_TEF, .of_board_id= adb,a4001n1, -@@ -4957,6 +5047,7 @@ static const struct board_info __initcon +@@ -4958,6 +5048,7 @@ static const struct board_info __initcon board_AR5381u, board_AR5387un, board_963281TAN, diff --git a/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch b/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch index 6cc28ea..706142d 100644 --- a/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch +++ b/target/linux/brcm63xx/patches-3.14/567-board_dsl-2751b_e1.patch @@ -142,7 +142,7 @@ #endif /* CONFIG_BCM63XX_CPU_6318 */ /* -@@ -5041,6 +5176,7 @@ static const struct board_info __initcon +@@ -5042,6 +5177,7 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6318 board_96318ref, board_96318ref_p300, diff --git a/target/linux/brcm63xx/profiles/huawei.mk b/target/linux/brcm63xx/profiles/huawei.mk index b0775c1..1014884 100644 --- a/target/linux/brcm63xx/profiles/huawei.mk +++ b/target/linux/brcm63xx/profiles/huawei.mk @@ -5,6 +5,15 @@ # See /LICENSE for more information. # +define Profile/HG520v + NAME:=Huawei EchoLife HG520v + PACKAGES:=kmod-b43
[OpenWrt-Devel] [PATCH 11/12] brcm63xx: Add DT support for HG553
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/hg553.dts b/target/linux/brcm63xx/dts/hg553.dts new file mode 100644 index 000..6a4c695 --- /dev/null +++ b/target/linux/brcm63xx/dts/hg553.dts @@ -0,0 +1,30 @@ +/dts-v1/; + +/include/ bcm6358.dtsi + +/ { + model = Huawei EchoLife HG553; + compatible = huawei,hg553, brcm,bcm6358; +}; + +pflash { + status = ok; + + linux,part-probe = bcm63xxpart; + + cfe@0 { + label = CFE; + reg = 0x00 0x02; + read-only; + }; + + linux@2 { + label = linux; + reg = 0x02 0xfe; + }; + + nvram@fe { + label = nvram; + reg = 0xfe 0x02; + }; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index 5b3e06c..b56e27d 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -57,15 +57,6 @@ define Image/Build/CFEDTB $(7) $(8) $(9) $(10) endef -define Image/Build/CFEHW553 - # 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 7 \ - --block-size 0x2 --image-offset $(4) -endef - define Image/Build/CFEAGPF # Generate the tagged image $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \ @@ -316,9 +307,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) - #HW553 - $(call Image/Build/CFEHW553,$(1),HW553,6358,0x2,HW553) - # T-Com Speedport W 303V Typ B $(call Image/Build/SPW303V,$(1),96358-502V,6358,SPW303V) @@ -368,6 +356,8 @@ $(eval $(call CfeImageDTB,DSL274XB_C,dsl-274xb-c,AW4139,6358,DSL274XB-C3)) $(eval $(call CfeImageDTB,DVAG3810BN,dva-g3810bn_tl,96358VW,6358,DVAG3810BN)) # Huawei HG520v $(eval $(call CfeImageDTB,HG520v,hg520v,HW6358GW_B,6358,HG520v,EchoLife_HG520v)) +# Huawei HG553 +$(eval $(call CfeImageDTB,HG553,hg553,HW553,6358,HG553,EchoLife_HG553,--image-offset 0x2 --block-size 0x2 --tag-version 7)) # Huawei HG556a $(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)) 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 3b26401..6d281ae 100644 --- a/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch +++ b/target/linux/brcm63xx/patches-3.14/508-board_hw553.patch @@ -1,12 +1,13 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -1471,6 +1471,83 @@ static struct board_info __initdata boar +@@ -1471,6 +1471,84 @@ static struct board_info __initdata boar .spis = nb4_spi_devices, .num_spis = ARRAY_SIZE(nb4_spi_devices), }; + +static struct board_info __initdata board_HW553 = { + .name = HW553, ++ .of_board_id= huawei,hg553, + .expected_cpu_id= 0x6358, + + .has_uart0 = 1, @@ -84,7 +85,7 @@ #endif /* CONFIG_BCM63XX_CPU_6358 */ /* -@@ -1516,6 +1593,7 @@ static const struct board_info __initcon +@@ -1516,6 +1594,7 @@ static const struct board_info __initcon board_dsl_274xb_rev_c, board_nb4_ser_r0, board_nb4_fxc_r1, diff --git a/target/linux/brcm63xx/patches-3.14/509-board_rta1320_16m.patch b/target/linux/brcm63xx/patches-3.14/509-board_rta1320_16m.patch index 9ce1d25..8349104 100644 --- a/target/linux/brcm63xx/patches-3.14/509-board_rta1320_16m.patch +++ b/target/linux/brcm63xx/patches-3.14/509-board_rta1320_16m.patch @@ -46,7 +46,7 @@ #endif /* CONFIG_BCM63XX_CPU_6338 */ /* -@@ -1564,6 +1603,7 @@ static const struct board_info __initcon +@@ -1565,6 +1604,7 @@ static const struct board_info __initcon board_96338gw, board_96338w, board_96338w2_e7t, 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 6a8d9c1..8a5c747 100644 --- a/target/linux/brcm63xx/patches-3.14/510-board_spw303v.patch +++ b/target/linux/brcm63xx/patches-3.14/510-board_spw303v.patch @@ -1,6 +1,6 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@
[OpenWrt-Devel] [PATCH 12/12] brcm63xx: Add DT support for P870HW-51a
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/p870hw-51a-v2.dts b/target/linux/brcm63xx/dts/p870hw-51a-v2.dts new file mode 100644 index 000..44a7eb2 --- /dev/null +++ b/target/linux/brcm63xx/dts/p870hw-51a-v2.dts @@ -0,0 +1,30 @@ +/dts-v1/; + +/include/ bcm6368.dtsi + +/ { + model = Zyxel P870HW-51a v2; + compatible = zyxel,p870hw-51a-v2, brcm,bcm6368; +}; + +pflash { + status = ok; + + linux,part-probe = bcm63xxpart; + + cfe@0 { + label = CFE; + reg = 0x00 0x01; + read-only; + }; + + linux@1 { + label = linux; + reg = 0x01 0x3e; + }; + + nvram@3e { + label = nvram; + reg = 0x3e 0x01; + }; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index b56e27d..84239a9 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -57,6 +57,20 @@ define Image/Build/CFEDTB $(7) $(8) $(9) $(10) endef +define Image/Build/ZYXCFEDTB + # 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) \ + --info1 -$(call Image/LimitName16,$(5)) --info2 $(1) \ + $(7) $(8) $(9) $(10) + # Fix up header + $(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \ + -o $(BIN_DIR)/openwrt-$(5)-$(1)-zyxcfe.bin + 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) \ @@ -212,6 +226,24 @@ define CfeImageDTB 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)) + 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 @@ -252,8 +284,6 @@ define Image/Build $(call Image/Build/CFE,$(1),RTA1025W_16,6348,RTA1025W_16,,--layoutver 5) # RTA1320_16M (numerous routers) $(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5) - # Zyxel P870HW-51a v2 - $(call Image/Build/ZyXEL,$(1),96368VVW,P870HW-51a_v2,6368,P870HW-51a_v2,ZyXEL,--signature ZyXEL_0001) # Sagem F@ST2504n $(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION)) @@ -373,5 +403,7 @@ $(eval $(call CfeImageDTB,Neufbox4,nb4-ser-r0,96358VW,6358,NEUFBOX4-SER,OpenWRT- $(eval $(call CfeImageDTB,Neufbox4,nb4-fxc-r1,96358VW,6358,NEUFBOX4-FXC,OpenWRT-$(REVISION))) # SFR neufbox 6 $(eval $(call CfeImageDTB,Neufbox6,nb6-ser-r0,NB6-SER-r0,6362,NEUFBOX6,OpenWRT-$(REVISION))) +# Zyxel P870HW-51a v2 +$(eval $(call ZyxCfeImageDTB,P870HW_51a_v2,p870hw-51a-v2,96368VVW,6368,P870HW-51a_v2,ZyXEL,--signature ZyXEL_0001)) $(eval $(call BuildImage)) diff --git a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch index 368f28a..9ba2226 100644 --- a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch +++ b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch @@ -1,11 +1,12 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -4180,6 +4180,96 @@ static struct sprom_fixup __initdata vr3 +@@ -4180,6 +4180,97 @@ static struct sprom_fixup __initdata vr3 { .offset = 115, .value = 0xfad9 }, }; +static struct board_info __initdata board_P870HW51A_V2 = { + .name = P870HW-51a_v2, ++ .of_board_id= zyxel,p870hw-51a-v2, + .expected_cpu_id= 0x6368, + + .has_uart0 = 1, @@ -97,7 +98,7 @@ static struct board_info __initdata board_VR3025u = { .name = 96368M-1541N, .of_board_id= comtrend,vr-3025u, -@@ -4883,6 +4973,7 @@ static const struct board_info __initcon +@@ -4883,6 +4974,7 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6368 board_96368mvwg, board_96368mvngr, diff --git a/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch b/target/linux/brcm63xx/patches-3.14/565-board_hw520.patch
[OpenWrt-Devel] [PATCH 7/12] brcm63xx: Add DT support for WAP-5813n
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/brcm63xx/dts/wap-5813n.dts b/target/linux/brcm63xx/dts/wap-5813n.dts new file mode 100644 index 000..f0659eb --- /dev/null +++ b/target/linux/brcm63xx/dts/wap-5813n.dts @@ -0,0 +1,31 @@ +/dts-v1/; + +/include/ bcm6368.dtsi + +/ { + model = Comtrend WAP-5813n; + compatible = comtrend,wap-5813n, brcm,bcm6368; +}; + +pflash { + status = ok; + + linux,part-probe = bcm63xxpart; + + cfe@0 { + label = CFE; + reg = 0x00 0x01; + read-only; + }; + + linux@1 { + label = linux; + reg = 0x01 0x7e; + read-only; + }; + + nvram@7f { + label = nvram; + reg = 0x7f 0x01; + }; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index 9c8deb6..137cc73 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -271,8 +271,6 @@ define Image/Build # Sagem F@ST2504n $(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION)) - # Comtrend WAP-5813n - $(call Image/Build/CFE,$(1),96369R-1231N,6368,WAP-5813n,,--pad 4) # Davolink DV201AMR $(call Image/Build/CFEOLD,$(1),DV201AMR,6348) # USR 9108 @@ -363,6 +361,8 @@ $(eval $(call CfeImageDTB,CT6373,ct-6373,CT6373-1,6358,CT-6373)) $(eval $(call CfeImageDTB,VR3025u,vr-3025u,96368M-1541N,6368,VR-3025u,,--pad 16 --image-offset 0x2 --block-size 0x2)) # Comtrend VR-3025un $(eval $(call CfeImageDTB,VR3025un,vr-3025un,96368M-1341N,6368,VR-3025un,,--pad 4)) +# Comtrend WAP-5813n +$(eval $(call CfeImageDTB,WAP5813n,wap-5813n,96369R-1231N,6368,WAP-5813n,,--pad 4)) # D-Link DSL-2740B/DSL-2741B, rev C2 $(eval $(call CfeImageDTB,DSL274XB_C,dsl-274xb-c,96358GW,6358,DSL274XB-C2)) # D-Link DSL-2740B/DSL-2741B, rev C3 diff --git a/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch b/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch index c8337cb..4a251db 100644 --- a/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch +++ b/target/linux/brcm63xx/patches-3.14/561-board_WAP-5813n.patch @@ -8,7 +8,7 @@ #include linux/platform_device.h #include linux/spi/spi.h #include linux/spi/spi_gpio.h -@@ -4167,6 +4168,117 @@ static struct board_info __initdata boar +@@ -4167,6 +4168,118 @@ static struct board_info __initdata boar .has_ohci0 = 1, .has_ehci0 = 1, }; @@ -38,6 +38,7 @@ + +static struct board_info __initdata board_WAP5813n = { + .name = 96369R-1231N, ++ .of_board_id= comtrend,wap-5813n, + .expected_cpu_id= 0x6368, + + .has_uart0 = 1, @@ -126,7 +127,7 @@ #endif /* CONFIG_BCM63XX_CPU_6368 */ /* -@@ -4546,6 +4658,7 @@ static const struct board_info __initcon +@@ -4546,6 +4659,7 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6368 board_96368mvwg, board_96368mvngr, diff --git a/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch b/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch index 25b7123..7aa4e5e 100644 --- a/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch +++ b/target/linux/brcm63xx/patches-3.14/562-board_VR-3025u.patch @@ -118,7 +118,7 @@ static struct b53_platform_data WAP5813n_b53_pdata = { .alias = eth0, }; -@@ -4658,6 +4769,7 @@ static const struct board_info __initcon +@@ -4659,6 +4770,7 @@ static const struct board_info __initcon #ifdef CONFIG_BCM63XX_CPU_6368 board_96368mvwg, board_96368mvngr, diff --git a/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch b/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch index 8e25172..49c8677 100644 --- a/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch +++ b/target/linux/brcm63xx/patches-3.14/563-board_VR-3025un.patch @@ -118,7 +118,7 @@ static struct b53_platform_data WAP5813n_b53_pdata = { .alias = eth0, }; -@@ -4770,6 +4881,7 @@ static const struct board_info __initcon +@@ -4771,6 +4882,7 @@ static const struct board_info __initcon board_96368mvwg, board_96368mvngr, board_VR3025u, diff --git a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch index 35ee212..e00bf34 100644 --- a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch +++ b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch @@ -97,7 +97,7 @@ static struct board_info __initdata board_VR3025u = { .name = 96368M-1541N, .of_board_id= comtrend,vr-3025u, -@@ -4880,6 +4970,7 @@ static const struct board_info __initcon +@@ -4881,6
[OpenWrt-Devel] [PATCH v2] brcm-wl: fix bash comparison error
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- v2: use string comparison. diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh index 69e3132..c27a2a3 100644 --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh @@ -209,7 +209,8 @@ enable_broadcom() { } local leddc=$(wlc ifname $device leddc) - [ $leddc -eq 0x ] || { + local leddc_off=$(printf 0x\n) + [ $leddc == $leddc_off ] || { leddc=0x005a000a; } ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH v2 12/12] brcm63xx: Add DT support for P870HW-51a
Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- v2: remove old macro and correct capitalization of ZyXEL diff --git a/target/linux/brcm63xx/dts/p870hw-51a-v2.dts b/target/linux/brcm63xx/dts/p870hw-51a-v2.dts new file mode 100644 index 000..44a7eb2 --- /dev/null +++ b/target/linux/brcm63xx/dts/p870hw-51a-v2.dts @@ -0,0 +1,30 @@ +/dts-v1/; + +/include/ bcm6368.dtsi + +/ { + model = Zyxel P870HW-51a v2; + compatible = zyxel,p870hw-51a-v2, brcm,bcm6368; +}; + +pflash { + status = ok; + + linux,part-probe = bcm63xxpart; + + cfe@0 { + label = CFE; + reg = 0x00 0x01; + read-only; + }; + + linux@1 { + label = linux; + reg = 0x01 0x3e; + }; + + nvram@3e { + label = nvram; + reg = 0x3e 0x01; + }; +}; diff --git a/target/linux/brcm63xx/image/Makefile b/target/linux/brcm63xx/image/Makefile index b56e27d..a9d938f 100755 --- a/target/linux/brcm63xx/image/Makefile +++ b/target/linux/brcm63xx/image/Makefile @@ -57,6 +57,20 @@ define Image/Build/CFEDTB $(7) $(8) $(9) $(10) endef +define Image/Build/ZYXCFEDTB + # 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) \ + --info1 -$(call Image/LimitName16,$(5)) --info2 $(1) \ + $(7) $(8) $(9) $(10) + # Fix up header + $(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \ + -o $(BIN_DIR)/openwrt-$(5)-$(1)-zyxcfe.bin + 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) \ @@ -99,20 +113,6 @@ define Image/Build/SPW303V rm -f $(BIN_DIR)/openwrt-$(4)-$(1)-cfe.bin.tmp endef -define Image/Build/ZyXEL - # Generate the tagged image - $(STAGING_DIR_HOST)/bin/imagetag -i $(KDIR)/vmlinux.lzma.cfe -f $(KDIR)/root.$(1) \ - --output $(BIN_DIR)/openwrt-$(5)-$(1).tmp \ - --boardid $(2) --chipid $(4) --entry $(KERNEL_ENTRY) \ - --load-addr $(LOADADDR) --rsa-signature $(6) \ - --info1 +$(call Image/LimitName16,$(3)) --info2 $(1) \ - $(7) $(8) $(9) $(10) - # Fix up header - $(STAGING_DIR_HOST)/bin/zyxbcm -i $(BIN_DIR)/openwrt-$(5)-$(1).tmp \ - -o $(BIN_DIR)/openwrt-$(5)-$(1)-cfe.bin - rm -f $(BIN_DIR)/openwrt-$(5)-$(1).tmp -endef - define Image/Build/CFEOLD $(TOPDIR)/scripts/brcmImage.pl -t -p\ -b $(2) -c $(3) \ @@ -212,6 +212,24 @@ define CfeImageDTB 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)) + 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 @@ -252,8 +270,6 @@ define Image/Build $(call Image/Build/CFE,$(1),RTA1025W_16,6348,RTA1025W_16,,--layoutver 5) # RTA1320_16M (numerous routers) $(call Image/Build/CFE,$(1),RTA1320_16M,6338,RTA1320_16M,,--layoutver 5) - # Zyxel P870HW-51a v2 - $(call Image/Build/ZyXEL,$(1),96368VVW,P870HW-51a_v2,6368,P870HW-51a_v2,ZyXEL,--signature ZyXEL_0001) # Sagem F@ST2504n $(call Image/Build/CFE,$(1),F@ST2504n,6362,F@ST2504n,OpenWRT-$(REVISION)) @@ -373,5 +389,7 @@ $(eval $(call CfeImageDTB,Neufbox4,nb4-ser-r0,96358VW,6358,NEUFBOX4-SER,OpenWRT- $(eval $(call CfeImageDTB,Neufbox4,nb4-fxc-r1,96358VW,6358,NEUFBOX4-FXC,OpenWRT-$(REVISION))) # SFR neufbox 6 $(eval $(call CfeImageDTB,Neufbox6,nb6-ser-r0,NB6-SER-r0,6362,NEUFBOX6,OpenWRT-$(REVISION))) +# ZyXEL P870HW-51a v2 +$(eval $(call ZyxCfeImageDTB,P870HW_51a_v2,p870hw-51a-v2,96368VVW,6368,P870HW-51a_v2,ZyXEL,--signature ZyXEL_0001)) $(eval $(call BuildImage)) diff --git a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch index 368f28a..9ba2226 100644 --- a/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch +++ b/target/linux/brcm63xx/patches-3.14/564-board_P870HW-51a_v2.patch @@ -1,11 +1,12 @@ --- a/arch/mips/bcm63xx/boards/board_bcm963xx.c +++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c -@@ -4180,6 +4180,96 @@ static struct
Re: [OpenWrt-Devel] dnsmasq 2.71 dies silently (hangs) / how to debug
I've noticed this issue with dnsmasq, I think that miniupnp is also having a similar issue where it dies silently after a few days. Can I apply the same method to debug miniupnp ?? Regards, Luis Garcia On Tue, Aug 19, 2014 at 10:45 AM, Bastian Bittorf bitt...@bluebottle.com wrote: * Steven Barth cy...@openwrt.org [19.08.2014 12:49]: procd_set_param limits core=unlimited thanks, this works fine here when the 'root' part of dnsmasq gets a -SIGSEGV (or during a real crash) and produces coredumps. i will keep the list updated, when i catch a real hang. bye, bastian ___ 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] kirkwood / howto make bootloader
On 19.08.2014 16:42 Bastian Bittorf wrote: under http://downloads.openwrt.org/barrier_breaker/14.07-rc3/kirkwood/generic/uboot-kirkwood-goflexhome/ i can see the kwb-files, but how can i build them? (when building generic or a subtarget they will not show up) In menuconfig: - Select Marvell Kirkwood as Target System. - Go to Boot Loaders - select the correct bootloader for your target. Regards, Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] NAND flashes in Broadcom routers: bad blocks, ECC
[cross-list e-mail to openwrt-devel and linux-mtd] Hi, I wanted to finally switch from NAND_ECC_NONE to NAND_ECC_SOFT (there is no hw ECC) but it appears it won't be that straightforward. The problem is NAND implementation in Broadcom's CFE bootloader. It appears that all the bootloader cares about is if block is good or bad. I think it doesn't even use BBT. It simply checks for oob[0x0] (or oob[0x5] for small flashes) being 0xff. Then it writes to the block or skips it. The bootloader doesn't seem to even calculate ECC when writing! So after installing firmware using bootloader all OOB content is 0xFF. Of course enableing NAND_ECC_SOFT results in uncorrectable errors: bcm47xxnflash: NAND_CMD_RNDOUT len:0x0F bcm47xxnflash: NAND_CMD_RNDOUT data FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF __nand_correct_data: uncorrectable ECC error __nand_correct_data: uncorrectable ECC error __nand_correct_data: uncorrectable ECC error mtd_read error while reading (offset: 0x6)! So I wonder how we could deal with that. Should I somehow detect if this is first boot after installation and calculate ECCs on my own? Hoping nothing wrong will happen of the first read? In case you wonder how Broadcom's firmware handles that. Well, horribly. They use two drivers: nflash and brcmnand. The first one (bcm_nflash.c) is a plain MTD driver that follows poor bootloader logic. It's responsible for kernel and rootfs partitions. It does not care about BBT or ECC. It assumes reading always success and it may mark blocks as bad after failed erase or write. The second one (brcmnand_47xx.c) is a nice NAND driver. It uses (in a bit hacky way, but still) NAND subsystem, handles ECC, etc. Broadcom uses it for brcmnand partition located after kernel and rootfs. -- Rafał ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [ANN] MicroPython - well-known scripting language, unbloated
Hello, On Sat, 16 Aug 2014 13:18:33 +0200 valent.turko...@gmail.com valent.turko...@gmail.com wrote: I'll definitely give cross-compiling for mips architecture (I have lots of AR9331 based routers around) a go and let you know how it worked out, or if it didn't work out. The latest news is that build recipes were contributed by another user: https://github.com/openwrt/packages/pull/211 https://github.com/openwrt/packages/pull/212 Does MicryPython have support for serial communication as Python has with PySerial? What I mostly need is some simple communication back and forth with different serial based devices, like bluetooth modules and such. Yep, I would have the same need. To make that possible, termios Python module should be implemented. I started coding it in my branch, will take some time to actually test/debug it. When it's done, I'll just port my pyserial-like unbloated module https://github.com/pfalcon/py-simple-serial , so the serial communication is within reach. I'll let you know once it's ready. Cheers, Valent. -- Best regards, Paul mailto:pmis...@gmail.com ___ 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] ramips: second spi device on rt5350
This is based on Jon Smirl's patch with the following changes: - Set CS polarity as low by default. - Add support for changing CS polarity. - Add support for changing LSB/MSB. - Add support for changing SPI mode. - Fix indentations. I tested it on a VoCore. Works fine connected to a second flash, but fails to detect MMC/SD cards due to SPI clock speed. Signed-off-by: Jon Smirl jonsm...@gmail.com Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/ramips/dts/rt5350.dtsi b/target/linux/ramips/dts/rt5350.dtsi index 722540b..8ba20bb 100644 --- a/target/linux/ramips/dts/rt5350.dtsi +++ b/target/linux/ramips/dts/rt5350.dtsi @@ -151,7 +151,7 @@ }; spi@b00 { - compatible = ralink,rt5350-spi, ralink,rt2880-spi; + compatible = ralink,rt5350-spi; reg = 0xb00 0x100; resets = rstctrl 18; @@ -161,7 +161,7 @@ #size-cells = 1; pinctrl-names = default; - pinctrl-0 = spi_pins; + pinctrl-0 = spi_pins spi_cs1; status = disabled; }; diff --git a/target/linux/ramips/patches-3.10/0222-rt5350-spi-second-device.patch b/target/linux/ramips/patches-3.10/0222-rt5350-spi-second-device.patch new file mode 100644 index 000..64c4150 --- /dev/null +++ b/target/linux/ramips/patches-3.10/0222-rt5350-spi-second-device.patch @@ -0,0 +1,368 @@ +--- a/drivers/spi/spi-rt2880.c b/drivers/spi/spi-rt2880.c +@@ -29,16 +29,17 @@ + #define SPI_BPW_MASK(bits) BIT((bits) - 1) + + #define DRIVER_NAME spi-rt2880 +-/* only one slave is supported*/ +-#define RALINK_NUM_CHIPSELECTS1 + /* in usec */ + #define RALINK_SPI_WAIT_MAX_LOOP 2000 + +-#define RAMIPS_SPI_STAT 0x00 +-#define RAMIPS_SPI_CFG0x10 +-#define RAMIPS_SPI_CTL0x14 +-#define RAMIPS_SPI_DATA 0x20 +-#define RAMIPS_SPI_FIFO_STAT 0x38 ++#define RAMIPS_SPI_DEV_OFFSET 0x40 ++ ++#define RAMIPS_SPI_STAT(cs) (0x00 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_CFG(cs)(0x10 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_CTL(cs)(0x14 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_DATA(cs) (0x20 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_FIFO_STAT(cs) (0x38 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_ARBITER0xF0 + + /* SPISTAT register bit field */ + #define SPISTAT_BUSY BIT(0) +@@ -68,6 +69,10 @@ + /* SPIFIFOSTAT register bit field */ + #define SPIFIFOSTAT_TXFULLBIT(17) + ++#define SPICTL_ARB_EN BIT(31) ++#define SPI1_POR BIT(1) ++#define SPI0_POR BIT(0) ++ + #define MT7621_SPI_TRANS 0x00 + #define SPITRANS_BUSY BIT(16) + #define MT7621_SPI_OPCODE 0x04 +@@ -78,13 +83,16 @@ + #define MT7621_SPI_MASTER 0x28 + #define MT7621_SPI_SPACE 0x3c + ++#define RT2880_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST | SPI_CS_HIGH) ++ + struct rt2880_spi; + + struct rt2880_spi_ops { + void (*init_hw)(struct rt2880_spi *rs); +- void (*set_cs)(struct rt2880_spi *rs, int enable); ++ void (*set_cs)(struct spi_device *spi, int enable); + int (*baudrate_set)(struct spi_device *spi, unsigned int speed); + unsigned int (*write_read)(struct spi_device *spi, struct list_head *list, struct spi_transfer *xfer); ++ int num_cs; + }; + + struct rt2880_spi { +@@ -141,6 +149,7 @@ static inline void rt2880_spi_clrbits(st + + static int rt2880_spi_baudrate_set(struct spi_device *spi, unsigned int speed) + { ++ int cs = spi-chip_select; + struct rt2880_spi *rs = spidev_to_rt2880_spi(spi); + u32 rate; + u32 prescale; +@@ -168,9 +177,9 @@ static int rt2880_spi_baudrate_set(struc + prescale = ilog2(rate / 2); + dev_dbg(spi-dev, prescale:%u\n, prescale); + +- reg = rt2880_spi_read(rs, RAMIPS_SPI_CFG); ++ reg = rt2880_spi_read(rs, RAMIPS_SPI_CFG(cs)); + reg = ((reg ~SPICFG_SPICLK_PRESCALE_MASK) | prescale); +- rt2880_spi_write(rs, RAMIPS_SPI_CFG, reg); ++ rt2880_spi_write(rs, RAMIPS_SPI_CFG(cs), reg); + rs-speed = speed; + return 0; + } +@@ -194,7 +203,8 @@ rt2880_spi_setup_transfer(struct spi_dev + { + struct rt2880_spi *rs = spidev_to_rt2880_spi(spi); + unsigned int speed = spi-max_speed_hz; +- int rc; ++ int rc, cs = spi-chip_select; ++ u32 reg; + + if ((t != NULL) t-speed_hz) + speed = t-speed_hz; +@@ -206,19 +216,61 @@ rt2880_spi_setup_transfer(struct spi_dev + return rc; + } + ++ reg = rt2880_spi_read(rs, RAMIPS_SPI_CFG(cs)); ++ ++ reg = (reg ~SPICFG_MSBFIRST); ++ if
Re: [OpenWrt-Devel] [PATCH v2 1/2] ramips: second spi device on rt5350
On Tue, Aug 19, 2014 at 3:33 PM, Álvaro Fernández Rojas nolt...@gmail.com wrote: This is based on Jon Smirl's patch with the following changes: - Set CS polarity as low by default. - Add support for changing CS polarity. - Add support for changing LSB/MSB. - Add support for changing SPI mode. - Fix indentations. I tested it on a VoCore. Works fine connected to a second flash, but fails to detect MMC/SD cards due to SPI clock speed. How is the clock speed wrong? Signed-off-by: Jon Smirl jonsm...@gmail.com Signed-off-by: Álvaro Fernández Rojas nolt...@gmail.com --- diff --git a/target/linux/ramips/dts/rt5350.dtsi b/target/linux/ramips/dts/rt5350.dtsi index 722540b..8ba20bb 100644 --- a/target/linux/ramips/dts/rt5350.dtsi +++ b/target/linux/ramips/dts/rt5350.dtsi @@ -151,7 +151,7 @@ }; spi@b00 { - compatible = ralink,rt5350-spi, ralink,rt2880-spi; + compatible = ralink,rt5350-spi; reg = 0xb00 0x100; resets = rstctrl 18; @@ -161,7 +161,7 @@ #size-cells = 1; pinctrl-names = default; - pinctrl-0 = spi_pins; + pinctrl-0 = spi_pins spi_cs1; status = disabled; }; diff --git a/target/linux/ramips/patches-3.10/0222-rt5350-spi-second-device.patch b/target/linux/ramips/patches-3.10/0222-rt5350-spi-second-device.patch new file mode 100644 index 000..64c4150 --- /dev/null +++ b/target/linux/ramips/patches-3.10/0222-rt5350-spi-second-device.patch @@ -0,0 +1,368 @@ +--- a/drivers/spi/spi-rt2880.c b/drivers/spi/spi-rt2880.c +@@ -29,16 +29,17 @@ + #define SPI_BPW_MASK(bits) BIT((bits) - 1) + + #define DRIVER_NAME spi-rt2880 +-/* only one slave is supported*/ +-#define RALINK_NUM_CHIPSELECTS1 + /* in usec */ + #define RALINK_SPI_WAIT_MAX_LOOP 2000 + +-#define RAMIPS_SPI_STAT 0x00 +-#define RAMIPS_SPI_CFG0x10 +-#define RAMIPS_SPI_CTL0x14 +-#define RAMIPS_SPI_DATA 0x20 +-#define RAMIPS_SPI_FIFO_STAT 0x38 ++#define RAMIPS_SPI_DEV_OFFSET 0x40 ++ ++#define RAMIPS_SPI_STAT(cs) (0x00 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_CFG(cs)(0x10 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_CTL(cs)(0x14 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_DATA(cs) (0x20 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_FIFO_STAT(cs) (0x38 + (cs * RAMIPS_SPI_DEV_OFFSET)) ++#define RAMIPS_SPI_ARBITER0xF0 + + /* SPISTAT register bit field */ + #define SPISTAT_BUSY BIT(0) +@@ -68,6 +69,10 @@ + /* SPIFIFOSTAT register bit field */ + #define SPIFIFOSTAT_TXFULLBIT(17) + ++#define SPICTL_ARB_EN BIT(31) ++#define SPI1_POR BIT(1) ++#define SPI0_POR BIT(0) ++ + #define MT7621_SPI_TRANS 0x00 + #define SPITRANS_BUSY BIT(16) + #define MT7621_SPI_OPCODE 0x04 +@@ -78,13 +83,16 @@ + #define MT7621_SPI_MASTER 0x28 + #define MT7621_SPI_SPACE 0x3c + ++#define RT2880_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST | SPI_CS_HIGH) ++ + struct rt2880_spi; + + struct rt2880_spi_ops { + void (*init_hw)(struct rt2880_spi *rs); +- void (*set_cs)(struct rt2880_spi *rs, int enable); ++ void (*set_cs)(struct spi_device *spi, int enable); + int (*baudrate_set)(struct spi_device *spi, unsigned int speed); + unsigned int (*write_read)(struct spi_device *spi, struct list_head *list, struct spi_transfer *xfer); ++ int num_cs; + }; + + struct rt2880_spi { +@@ -141,6 +149,7 @@ static inline void rt2880_spi_clrbits(st + + static int rt2880_spi_baudrate_set(struct spi_device *spi, unsigned int speed) + { ++ int cs = spi-chip_select; + struct rt2880_spi *rs = spidev_to_rt2880_spi(spi); + u32 rate; + u32 prescale; +@@ -168,9 +177,9 @@ static int rt2880_spi_baudrate_set(struc + prescale = ilog2(rate / 2); + dev_dbg(spi-dev, prescale:%u\n, prescale); + +- reg = rt2880_spi_read(rs, RAMIPS_SPI_CFG); ++ reg = rt2880_spi_read(rs, RAMIPS_SPI_CFG(cs)); + reg = ((reg ~SPICFG_SPICLK_PRESCALE_MASK) | prescale); +- rt2880_spi_write(rs, RAMIPS_SPI_CFG, reg); ++ rt2880_spi_write(rs, RAMIPS_SPI_CFG(cs), reg); + rs-speed = speed; + return 0; + } +@@ -194,7 +203,8 @@ rt2880_spi_setup_transfer(struct spi_dev + { + struct rt2880_spi *rs = spidev_to_rt2880_spi(spi); + unsigned int speed = spi-max_speed_hz; +- int rc; ++ int rc, cs = spi-chip_select; ++ u32 reg; + + if ((t != NULL) t-speed_hz) + speed =
Re: [OpenWrt-Devel] [PATCH v2 1/2] ramips: second spi device on rt5350
El 19/08/2014 21:43, jonsm...@gmail.com escribió: How is the clock speed wrong? The lowest speed the RT5350 SPI controller can achieve is System Clock / 128. System Clock = 120MHz Lowest SPI Clock = 120MHz / 128 = 937.5KHz However, the MMC/SD cards need to be initialized at 100-400KHz. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2 1/2] ramips: second spi device on rt5350
On Tue, Aug 19, 2014 at 3:48 PM, Álvaro Fernández Rojas nolt...@gmail.com wrote: El 19/08/2014 21:43, jonsm...@gmail.com escribió: How is the clock speed wrong? The lowest speed the RT5350 SPI controller can achieve is System Clock / 128. System Clock = 120MHz Lowest SPI Clock = 120MHz / 128 = 937.5KHz However, the MMC/SD cards need to be initialized at 100-400KHz. This might work... Put the SPI pins into GPIO mode. Use the kernel bit-bang support for SPI to initialize the card. Then go back to high speed mode. -- Jon Smirl jonsm...@gmail.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2 1/2] ramips: second spi device on rt5350
This site has a write up on how SPI mode works. http://elm-chan.org/docs/mmc/mmc_e.html On Tue, Aug 19, 2014 at 3:59 PM, jonsm...@gmail.com jonsm...@gmail.com wrote: On Tue, Aug 19, 2014 at 3:48 PM, Álvaro Fernández Rojas nolt...@gmail.com wrote: El 19/08/2014 21:43, jonsm...@gmail.com escribió: How is the clock speed wrong? The lowest speed the RT5350 SPI controller can achieve is System Clock / 128. System Clock = 120MHz Lowest SPI Clock = 120MHz / 128 = 937.5KHz However, the MMC/SD cards need to be initialized at 100-400KHz. This might work... Put the SPI pins into GPIO mode. Use the kernel bit-bang support for SPI to initialize the card. Then go back to high speed mode. -- Jon Smirl jonsm...@gmail.com -- Jon Smirl jonsm...@gmail.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH v2 1/2] ramips: second spi device on rt5350
How to use SPI bitbang on OpenWRT http://randomcoderdude.wordpress.com/2013/08/15/spi-over-gpio-in-openwrt/ On Tue, Aug 19, 2014 at 4:03 PM, jonsm...@gmail.com jonsm...@gmail.com wrote: This site has a write up on how SPI mode works. http://elm-chan.org/docs/mmc/mmc_e.html On Tue, Aug 19, 2014 at 3:59 PM, jonsm...@gmail.com jonsm...@gmail.com wrote: On Tue, Aug 19, 2014 at 3:48 PM, Álvaro Fernández Rojas nolt...@gmail.com wrote: El 19/08/2014 21:43, jonsm...@gmail.com escribió: How is the clock speed wrong? The lowest speed the RT5350 SPI controller can achieve is System Clock / 128. System Clock = 120MHz Lowest SPI Clock = 120MHz / 128 = 937.5KHz However, the MMC/SD cards need to be initialized at 100-400KHz. This might work... Put the SPI pins into GPIO mode. Use the kernel bit-bang support for SPI to initialize the card. Then go back to high speed mode. -- Jon Smirl jonsm...@gmail.com -- Jon Smirl jonsm...@gmail.com -- Jon Smirl jonsm...@gmail.com ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] dnsmasq 2.71 dies silently (hangs) / how to debug
No, miniupnp doesn't use procd yet. However you should be able to use the usual: ulimit -c unlimited somewhere above the service_start call to enable core dumps. On 19. August 2014 19:15:32 MESZ, Luis E. Garcia l...@bitamins.net wrote: I've noticed this issue with dnsmasq, I think that miniupnp is also having a similar issue where it dies silently after a few days. Can I apply the same method to debug miniupnp ?? Regards, Luis Garcia On Tue, Aug 19, 2014 at 10:45 AM, Bastian Bittorf bitt...@bluebottle.com wrote: * Steven Barth cy...@openwrt.org [19.08.2014 12:49]: procd_set_param limits core=unlimited thanks, this works fine here when the 'root' part of dnsmasq gets a -SIGSEGV (or during a real crash) and produces coredumps. i will keep the list updated, when i catch a real hang. bye, bastian ___ 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