[OpenWrt-Devel] [PATCH] Ralink RT288x/RT3xxx: Added support for ZBT-826 / ZBT-1026
Support for these MT7620-based routers: https://wiki.openwrt.org/toh/zbt/we-826 Based on Oskari’s patches found here: https://dev.openwrt.org/ticket/19996 Signed-off-by: Jamie Stuart --- diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds old mode 100755 new mode 100644 index d1b4e15..8fd50fe --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -268,6 +268,11 @@ zbt-wa05) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +zbt-we826) + ucidef_set_led_default "power" "power" "$board:green:power" "1" + set_wifi_led "$board:green:wifi" + set_usb_led "$board:green:usb" + ;; zbt-wr8305rt) ucidef_set_led_default "power" "power" "$board:green:sys" "1" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network old mode 100755 new mode 100644 index 0121e51..0a680d0 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -209,6 +209,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "0:wan" "6@eth0" ;; + zbt-we826|\ zbt-wr8305rt) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh old mode 100755 new mode 100644 index c6c32fe..8bfa814 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -478,6 +478,9 @@ ramips_board_detect() { *"ZBT-WG2626") name="zbt-wg2626" ;; + *"ZBT-WE826") + name="zbt-we826" + ;; *"ZBT-WR8305RT") name="zbt-wr8305rt" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh old mode 100755 new mode 100644 index 5575b4c..d27d7eb --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -139,6 +139,7 @@ platform_check_image() { y1s|\ zbt-wa05|\ zbt-wg2626|\ + zbt-we826|\ zbt-wr8305rt|\ zte-q7|\ youku-yk1) diff --git a/target/linux/ramips/dts/ZBT-WE826.dts b/target/linux/ramips/dts/ZBT-WE826.dts new file mode 100644 index 000..22bef99 --- /dev/null +++ b/target/linux/ramips/dts/ZBT-WE826.dts @@ -0,0 +1,124 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc"; + model = "ZBT-WE826"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + palmbus@1000 { + gpio0: gpio@600 { + status = "okay"; + }; + + gpio1: gpio@638 { + status = "okay"; + }; + + gpio3: gpio@688 { + status = "okay"; + }; + + spi@b00 { + status = "okay"; + + en25q128@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q128"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <1000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x3>; + read-only; + }; + + partition@3 { + label = "u-boot-env"; + reg = <0x3 0x1>; + read-only; + }; + + factory: partition@4 { + label = "factory"; + reg = <0x4 0x1>; + read-only; + }; + + partition@5 { + label = "firmware"; + reg = <0x5 0xfb>; + }; + }; + }; + }; + + sdhci@1013 { + status = "okay"; + }; + + ehci@101c { + status = "okay"; + }; + + ohci@101c1000 { + status = "okay"; + }; + +
Re: [OpenWrt-Devel] [PATCH] Ralink RT288x/RT3xxx: Added support for ZBT-826 / ZBT-1026
Hi, On 29/02/2016 11:30, Jamie Stuart wrote: > --- a/target/linux/ramips/base-files/lib/ramips.sh > +++ b/target/linux/ramips/base-files/lib/ramips.sh > @@ -478,6 +478,9 @@ ramips_board_detect() { > *"ZBT-WG2626") > name="zbt-wg2626" > ;; > + *"ZBT-WE826") > + name="zbt-we826" > + ;; > *"ZBT-WR8305RT") > name="zbt-wr8305rt" please keep the alphabetical ordering. this seems to be wrong several places in the patch. also use "ramips:" as a prefix rather than "Ralink RT288x/RT3xxx" John ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ramips: Added support for ZBT-826 / ZBT-1026
V2 - corrected alphabetic ordering Support for these MT7620-based routers: https://wiki.openwrt.org/toh/zbt/we-826 Based on Oskari’s patches found here: https://dev.openwrt.org/ticket/19996 Tested on we-1026 and we-826-T --- diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds old mode 100755 new mode 100644 index d1b4e15..8fd50fe --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -268,6 +268,11 @@ zbt-wa05) set_wifi_led "$board:blue:air" set_usb_led "$board:blue:usb" ;; +zbt-we826) + ucidef_set_led_default "power" "power" "$board:green:power" "1" + set_wifi_led "$board:green:wifi" + set_usb_led "$board:green:usb" + ;; zbt-wr8305rt) ucidef_set_led_default "power" "power" "$board:green:sys" "1" set_usb_led "$board:green:usb" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network old mode 100755 new mode 100644 index 0121e51..0a680d0 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -209,6 +209,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "0:wan" "6@eth0" ;; + zbt-we826|\ zbt-wr8305rt) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh old mode 100755 new mode 100644 index c6c32fe..c4eb357 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -475,6 +475,9 @@ ramips_board_detect() { *"ZBT-WA05") name="zbt-wa05" ;; + *"ZBT-WE826") + name="zbt-we826" + ;; *"ZBT-WG2626") name="zbt-wg2626" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh old mode 100755 new mode 100644 index 5575b4c..8742306 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -138,6 +138,7 @@ platform_check_image() { y1|\ y1s|\ zbt-wa05|\ + zbt-we826|\ zbt-wg2626|\ zbt-wr8305rt|\ zte-q7|\ diff --git a/target/linux/ramips/dts/ZBT-WE826.dts b/target/linux/ramips/dts/ZBT-WE826.dts new file mode 100644 index 000..22bef99 --- /dev/null +++ b/target/linux/ramips/dts/ZBT-WE826.dts @@ -0,0 +1,124 @@ +/dts-v1/; + +/include/ "mt7620a.dtsi" + +/ { + compatible = "zbtlink,zbt-we826", "ralink,mt7620a-soc"; + model = "ZBT-WE826"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + palmbus@1000 { + gpio0: gpio@600 { + status = "okay"; + }; + + gpio1: gpio@638 { + status = "okay"; + }; + + gpio3: gpio@688 { + status = "okay"; + }; + + spi@b00 { + status = "okay"; + + en25q128@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "w25q128"; + reg = <0 0>; + linux,modalias = "m25p80"; + spi-max-frequency = <1000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x3>; + read-only; + }; + + partition@3 { + label = "u-boot-env"; + reg = <0x3 0x1>; + read-only; + }; + + factory: partition@4 { + label = "factory"; + reg = <0x4 0x1>; + read-only; + }; + + partition@5 { + label = "firmware"; + reg = <0x5 0xfb>; + }; + }; + }; + }; + + sdhci@1013 { + status = "okay"; + }; + + ehci@101c { + status = "okay"; + }; + + ohci@101c1000 { + status =
[OpenWrt-Devel] XORG and PHONE feeds are down
Hello forks, I have noticed that the feeds in the object are still broken (it has been a couple of days now since then). Any chance to get alternative mirrors for PHONE and XORG packages ? Best, Arturo ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [BUG] kernel crash in br_netfilter
I've been fighting a kernel bug that is producing random crashes around network / skb_layer for a long time and was able to isolate it (or one of its components) to the br_netfilter module. I am reproducing the bug with PowerPC (TL-WDR4900v1.3) and MIPS (DB120, ar71xx) based systems. Florian Westphal did not see it on kvm/x86, it is unclear whether this requires a physical system or is CPU specific. This bug is in the latest OpenWRT (tested HEAD is 03b15ae9), as it happens with firmwares built 2+ years ago, so it is no current regression but something that was there for a long time. Reproducing the crash 1. build the firmware for the system to test * use default configuration * ensure to select CONFIG_BRIDGE_NETFILTER in kernel_menuconfig 2. boot the device and access it over serial 3. ensure br-lan bridge has at least two active ports * tested with ath9k + Ethernet (gianfar and ag71xx) * if not enabled, enable radio0 and ensure wlan0 is in bridge 4. run: sysctl -w net.bridge.bridge-nf-call-iptables=1 5. from your host, continuously ping the device over Ethernet 6. run: ifconfig br-lan down The next ingress packet causes a fatal crash. Trace logs for MIPS and PPC are attached and hint to __nf_conntrack_confirm Let me know if I could provide more information to further isolate the problem. Thanks, Zefir [ 191.321163] br-lan: port 1(eth0.1) entered disabled state [ 192.646656] CPU 0 Unable to handle kernel paging request at virtual address 00200200, epc == 87000670, ra == 870018f4 [ 192.657446] Oops[#1]: [ 192.659761] CPU: 0 PID: 0 Comm: swapper Not tainted 4.1.16 #1 [ 192.665593] task: 803ce958 ti: 803c8000 task.ti: 803c8000 [ 192.671069] $ 0 : 8001 00200200 [ 192.676410] $ 4 : 86c0fa20 0001 a44465b9 [ 192.681742] $ 8 : 86c0fa78 86c0fa78 [ 192.687075] $12 : 115f0002 c0a80114 [ 192.692408] $16 : 86c0fa20 06cc 07b6 803e5af0 [ 192.697742] $20 : 06cc 0004 803e5af0 [ 192.703082] $24 : 871367d4 [ 192.708416] $28 : 803c8000 803c9a28 86c0fa60 870018f4 [ 192.713750] Hi: 07b6 [ 192.716670] Lo: b5a74800 [ 192.719628] epc : 87000670 nf_conntrack_find_get+0x68/0x88 [nf_conntrack] [ 192.726698] ra: 870018f4 __nf_conntrack_confirm+0xc0/0x364 [nf_conntrack] [ 192.733927] Status: 1100fc03 KERNEL EXL IE [ 192.738196] Cause : 808c [ 192.741117] BadVA : 00200200 [ 192.744040] PrId : 0001974c (MIPS 74Kc) [ 192.748015] Modules linked in: ath9k ath9k_common pppoe ppp_async iptable_nat ath9k_hw ath pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 mac80211 ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nan [ 192.816284] Process swapper (pid: 0, threadinfo=803c8000, task=803ce958, tls=) [ 192.824311] Stack : 87342240 87135744 0001 0200 803c9aac 803c9aec 803cabac 87342240 0001 0004 0003 ff62 8026efb0 86c0fa20 87342240 8731f000 86c18100 87137058 87342240 803c9aec 87342240 803cab24 fffb 0001 8026f090 8734ca80 87865b7c 0008 87137058 803caba4 87342240 0001 8731f000 87342240 8731f05c ... [ 192.860643] Call Trace: [ 192.863133] [<87000670>] nf_conntrack_find_get+0x68/0x88 [nf_conntrack] [ 192.869850] [ 192.871356] Code: 00020336 8c820008 30450001 <14a2> ac62 ac430004 3c020020 24420200 ac82000c [ 192.881512] ---[ end trace 1e716eb17e40af8b ]--- [ 192.888247] Kernel panic - not syncing: Fatal exception in interrupt [ 192.895654] Rebooting in 3 seconds.. [ 69.834129] br0: port 3(eth1) entered disabled state [ 69.835427] br0: port 1(wlan0) entered disabled state [ 77.493530] Unable to handle kernel paging request for data at address 0x00200200 [ 77.495415] Faulting instruction address: 0xd32ce874 [ 77.496669] Oops: Kernel access of bad area, sig: 11 [#1] [ 77.498027] DT50 [ 77.498493] Modules linked in: ath9k ath9k_common iptable_nat ath9k_hw ath nf_nat_ipv4 nf_conntrack_ipv4 mac80211 ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_string xt_statistic xt_state xt_recent xt_quota xt_pkh [ 77.522830] CPU: 0 PID: 0 Comm: swapper Not tainted 3.18.23 #10 [ 77.524323] task: c035b300 ti: cffe6000 task.ti: c037 [ 77.525684] NIP: d32ce874 LR: d32cffec CTR: d35b13c4 [ 77.526936] REGS: cffe7c60 TRAP: 0300 Not tainted (3.18.23) [ 77.528403] MSR: 00029000 CR: 42002082 XER: 2000 [ 77.529951] DEAR: 00200200 ESR: 0080 GPR00: c762b218 cffe7d10 c035b300 c762b1c0 8db8d32d d72044d0 GPR08: 0001 8001 00200200 332f4b8b 22002082 10025420 0020 c7654080 GPR16: c7504d80 c7b7e540 cfba4678 c7b4a000 86dd 8000 0002 GPR24: c762b200 0e25 02b1 c0366fc8 0225 06b1 c762b1c0 [ 77.538144] NIP [d32ce874] 0xd32ce874 [
[OpenWrt-Devel] regex issue / asterisk / musl / sed
dear hackers, i cannot find any former issue with that, but want to document this here. I spotted an issue in one of our scripts and it boils down to: root@box:~ echo 'o*o' | sed -e 's/*/asterisk/g' sed: bad regex '*': Invalid regexp root@box:~ echo 'o*o' | sed -e 's/\*/asterisk/g' oasterisko it's musl 1.1.14 on OpenWrt / r48814 both commands are working fine with glibc and uclibc but the first invokation fails with musl 1.1.14 but works with musl 1.1.13. unsre if the prob is on my side, maybe $you have an idea... bye, bastian ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [musl] regex issue / asterisk / musl / sed
* Bastian Bittorf [2016-02-29 13:57:36 +0100]: > root@box:~ echo 'o*o' | sed -e 's/*/asterisk/g' > sed: bad regex '*': Invalid regexp > root@box:~ echo 'o*o' | sed -e 's/\*/asterisk/g' > oasterisko > > it's musl 1.1.14 on OpenWrt / r48814 > both commands are working fine with glibc and uclibc > but the first invokation fails with musl 1.1.14 but > works with musl 1.1.13. unsre if the prob is on my > side, maybe $you have an idea... yes, i introduced this regression in http://git.musl-libc.org/cgit/musl/commit/?id=7eaa76fc2e7993582989d3838b1ac32dd8abac09 because i missed the special * behaviour for BRE, but even before that ^* was broken so just reverting the patch is not enough, handling * after an anchor or assertion correctly needs more code changes. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] base-files: add function ucidef_set_interface_raw
This function can be used to configure default configuration on interfaces other than lan and wan, such as wlan or other custom interfaces. Signed-off-by: Micke Prag --- package/base-files/files/lib/functions/uci-defaults.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/package/base-files/files/lib/functions/uci-defaults.sh b/package/base-files/files/lib/functions/uci-defaults.sh index 512e0ed..d36ead2 100755 --- a/package/base-files/files/lib/functions/uci-defaults.sh +++ b/package/base-files/files/lib/functions/uci-defaults.sh @@ -89,6 +89,12 @@ ucidef_set_interfaces_lan_wan() { json_select .. } +ucidef_set_interface_raw() { + json_select_object network + _ucidef_set_interface "$@" + json_select .. +} + _ucidef_add_switch_port() { # inherited: $num $device $need_tag $role $index $prev_role # inherited: $n_cpu $n_ports $n_vlan $cpu0 $cpu1 $cpu2 $cpu3 $cpu4 $cpu5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/3] firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile warnings
Signed-off-by: Matthias Schiffer --- tools/firmware-utils/Makefile| 2 +- tools/firmware-utils/src/mkfwimage.c | 12 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 7a4403c..2573d8c 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -32,7 +32,7 @@ define Host/Compile $(call cc,mkzynfw) $(call cc,lzma2eva,-lz) $(call cc,mkcasfw) - $(call cc,mkfwimage,-lz) + $(call cc,mkfwimage,-lz -Wall) $(call cc,mkfwimage2,-lz) $(call cc,imagetag imagetag_cmdline cyg_crc32) $(call cc,add_header) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index e3a03c1..00bf439 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -104,8 +104,6 @@ typedef struct part_data { #define OPTIONS "B:hv:m:o:r:k:" -static int debug = 0; - typedef struct image_info { char magic[16]; char version[256]; @@ -236,9 +234,9 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c fw_layout_t* p; p = &fw_layout_data[0]; - while ((strlen(p->name) != 0) && (strncmp(p->name, board_name, sizeof(board_name)) != 0)) + while (*p->name && (strcmp(p->name, board_name) != 0)) p++; - if (p->name == NULL) { + if (!*p->name) { printf("BUG! Unable to find default fw layout!\n"); exit(-1); } @@ -247,7 +245,7 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c strcpy(kernel->partition_name, "kernel"); kernel->partition_index = 1; kernel->partition_baseaddr = p->kern_start; - if ( (kernel->partition_length = filelength(kernelfile)) < 0) return (-1); + if ( (kernel->partition_length = filelength(kernelfile)) == (u_int32_t)-1) return (-1); kernel->partition_memaddr = p->kern_entry; kernel->partition_entryaddr = p->kern_entry; strncpy(kernel->filename, kernelfile, sizeof(kernel->filename)); @@ -263,8 +261,8 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c rootfs->partition_entryaddr = 0x; strncpy(rootfs->filename, rootfsfile, sizeof(rootfs->filename)); -printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr); -printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr); + printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr); + printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr); im->part_count = 2; return 0; -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/3] ar71xx, firmware-utils: split ubdev01 flash layout from XM
The ubdev01 profile defines its own MTDPARTS with smaller firmware partition, so give it its own UBNT_BOARD in mkfwimage. Signed-off-by: Matthias Schiffer --- target/linux/ar71xx/image/Makefile | 2 +- tools/firmware-utils/src/mkfwimage.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index cb11104..ca4437b 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -1203,7 +1203,7 @@ define Device/ubdev01 $(Device/ubnt-xm) MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,7488k(firmware),64k(certs),256k(cfg)ro,64k(EEPROM)ro BOARDNAME := UBNT-UF - UBNT_BOARD := XM + UBNT_BOARD := UBDEV01 UBNT_TYPE := XM UBNT_CHIP := ar7240 endef diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 00bf439..5dae284 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -81,6 +81,12 @@ fw_layout_t fw_layout_data[] = { .kern_entry = 0x80002000, .firmware_max_length= 0x006A, }, + { + .name = "UBDEV01", + .kern_start = 0x9f05, + .kern_entry = 0x80002000, + .firmware_max_length= 0x006A, + }, { .name = "", }, }; -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 3/3] firmware-utils: mkfwimage: fix firmware_max_length for XM layout
The new u-boot version bundled with the 5.6.x firmwares from Ubiquiti gets confused by the smaller rootfs partition size; this can lead to various issues: 1. We've gotten reports that flashing from the 5.6.x stock firmware to OpenWrt will brick devices; I wasn't able to reproduce this myself 2. Flashing from 5.5.x stock firmware to OpenWrt and back to stock (via TFTP recovery), following by an update to 5.6.x via web interface can yield a bricked device with the following properties: - It can't be booted without entering commands over a serial console, as u-boot supplies the wrong MTD layout - The web interface won't accept any image with the original flash layout, so stock firmware upgrades are impossible - As the TFTP recovery doesn't update u-boot, returning to the old u-boot from firmware 5.5.x is impossible To recover from 2., creating an OpenWrt image which doesn't set u-boot as read-only and flashing a backup of the old u-boot from there is the only way known to me. (Fixing the mtdparts variable in u-boot-env from OpenWrt might also work; settings this from u-boot over serial didn't have any permanent effect.) Fix all of this by setting the correct flash layout also used by the stock firmware. Flashing has been tested from both firmware 5.5.x and 5.6.x. The fixed layout also matches the mtdparts defined by OpenWrt. Signed-off-by: Matthias Schiffer --- tools/firmware-utils/src/mkfwimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 5dae284..d8d5239 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -79,7 +79,7 @@ fw_layout_t fw_layout_data[] = { .name = "XM", .kern_start = 0x9f05, .kern_entry = 0x80002000, - .firmware_max_length= 0x006A, + .firmware_max_length= 0x0076, }, { .name = "UBDEV01", -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [musl] regex issue / asterisk / musl / sed
* Szabolcs Nagy [2016-02-29 14:53:48 +0100]: > * Bastian Bittorf [2016-02-29 13:57:36 +0100]: > > root@box:~ echo 'o*o' | sed -e 's/*/asterisk/g' > > sed: bad regex '*': Invalid regexp > > root@box:~ echo 'o*o' | sed -e 's/\*/asterisk/g' > > oasterisko > > > > it's musl 1.1.14 on OpenWrt / r48814 > > both commands are working fine with glibc and uclibc > > but the first invokation fails with musl 1.1.14 but > > works with musl 1.1.13. unsre if the prob is on my > > side, maybe $you have an idea... > > yes, i introduced this regression in > http://git.musl-libc.org/cgit/musl/commit/?id=7eaa76fc2e7993582989d3838b1ac32dd8abac09 > > because i missed the special * behaviour for BRE, > but even before that ^* was broken so just reverting > the patch is not enough, handling * after an anchor > or assertion correctly needs more code changes. a possible fix is attached, the handling of ^ and $ in BRE is suboptimal, but that will need a bigger refactoring. >From b4abe263b2bc0c183274d1aec70cc586e4a46ba1 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Mon, 29 Feb 2016 15:04:46 + Subject: [PATCH 1/2] fix * at the start of a BRE subexpression commit 7eaa76fc2e7993582989d3838b1ac32dd8abac09 made * invalid at the start of a BRE subexpression, but it should be accepted as literal * there according to the standard. This patch does not fix subexpressions starting with ^*. --- src/regex/regcomp.c |4 1 file changed, 4 deletions(-) diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c index da6abd1..7a2864c 100644 --- a/src/regex/regcomp.c +++ b/src/regex/regcomp.c @@ -889,7 +889,6 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, const char *s) s++; break; case '*': - return REG_BADPAT; case '{': case '+': case '?': @@ -978,9 +977,6 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx) } parse_iter: - /* extension: repetitions are rejected after an empty node - eg. (+), |*, {2}, but assertions are not treated as empty - so ^* or $? are accepted currently. */ for (;;) { int min, max; -- 1.7.9.5 >From d24223c8b344ab3c58f1b9200379bd5349bb8cee Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Mon, 29 Feb 2016 16:36:25 + Subject: [PATCH 2/2] fix ^* at the start of a complete BRE This is a workaround to treat * as literal * at the start of a BRE. Ideally ^ would be treated as an anchor at the start of any BRE subexpression and similarly $ would be an anchor at the end of any subexpression. This is not required by the standard and hard to do with the current code, but it's the existing practice. If it is changed, * should be treated as literal after such anchor as well. --- src/regex/regcomp.c |4 1 file changed, 4 insertions(+) diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c index 7a2864c..5fad98b 100644 --- a/src/regex/regcomp.c +++ b/src/regex/regcomp.c @@ -994,6 +994,10 @@ static reg_errcode_t tre_parse(tre_parse_ctx_t *ctx) if (*s=='\\') s++; + /* handle ^* at the start of a complete BRE. */ + if (!ere && s==ctx->re+1 && s[-1]=='^') +break; + /* extension: multiple consecutive *+?{,} is unspecified, but (a+)+ has to be supported so accepting a++ makes sense, note however that the RE_DUP_MAX limit can be -- 1.7.9.5 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RFC 1/4] include: add Cortex-A53 CPU_TYPE
Signed-off-by: Álvaro Fernández Rojas --- include/target.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/target.mk b/include/target.mk index dbb6327..76fbd99 100644 --- a/include/target.mk +++ b/include/target.mk @@ -237,6 +237,7 @@ ifeq ($(DUMP),1) CPU_CFLAGS_cortex-a8 = -march=armv7-a -mtune=cortex-a8 CPU_CFLAGS_cortex-a9 = -march=armv7-a -mtune=cortex-a9 CPU_CFLAGS_cortex-a15 = -march=armv7-a -mtune=cortex-a15 +CPU_CFLAGS_cortex-a53 = -march=armv8-a -mtune=cortex-a53 CPU_CFLAGS_fa526 = -march=armv4 -mtune=fa526 CPU_CFLAGS_mpcore = -march=armv6k -mtune=mpcore CPU_CFLAGS_xscale = -march=armv5te -mtune=xscale -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RFC 2/4] brcm2708-gpu-fw: update to latest version
Signed-off-by: Álvaro Fernández Rojas --- package/kernel/brcm2708-gpu-fw/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package/kernel/brcm2708-gpu-fw/Makefile b/package/kernel/brcm2708-gpu-fw/Makefile index 48c9929..857fac7 100644 --- a/package/kernel/brcm2708-gpu-fw/Makefile +++ b/package/kernel/brcm2708-gpu-fw/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2012-2015 OpenWrt.org +# Copyright (C) 2012-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=brcm2708-gpu-fw -PKG_REV:=98e801605b31a5d7a4c36de5cb1d0e33ce95e8ab -PKG_VERSION:=20151214 +PKG_REV:=e0fcda1592f142689ba5ae735863581eb9226dac +PKG_VERSION:=20160229 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_REV).tar.gz PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/ -PKG_MD5SUM:=66bbad77fdd9e5391d4130fa11d94646 +PKG_MD5SUM:=a8ec6c3e61ca1ad1b90c6282c85630e8 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV) -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [RFC 0/4] Add support for Raspberry Pi 3
This adds untested support for Raspberry Pi 3. I will be able to test it when I get my RPi 3 ;D. In the meantime if anyone already has a RPi 3 and wants to test it here's the image: http://files.noltari.es/openwrt/rpi3/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img http://files.noltari.es/openwrt/rpi3/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz Álvaro Fernández Rojas (4): include: add Cortex-A53 CPU_TYPE brcm2708-gpu-fw: update to latest version brcm2708: update linux 4.4 patches to latest version brcm2708: add Raspberry Pi 3 support include/target.mk | 1 + package/kernel/brcm2708-gpu-fw/Makefile| 8 +- target/linux/brcm2708/Makefile | 8 +- target/linux/brcm2708/bcm2708/config-4.4 | 4 +- target/linux/brcm2708/bcm2709/config-4.4 | 4 +- target/linux/brcm2708/bcm2710/config-4.4 | 390 .../brcm2708/bcm2710/profiles/RaspberryPi3.mk | 14 + target/linux/brcm2708/bcm2710/target.mk| 12 + target/linux/brcm2708/image/Makefile | 12 +- target/linux/brcm2708/modules.mk | 19 + ...0001-smsx95xx-fix-crimes-against-truesize.patch | 4 +- ...02-smsc95xx-Disable-turbo-mode-by-default.patch | 4 +- ...around-for-issue-where-dirty-page-count-g.patch | 4 +- .../0004-BCM2835_DT-Fix-I2S-register-map.patch | 4 +- ...-Prevent-spurious-interrupts-and-trap-the.patch | 4 +- .../0006-irqchip-bcm2835-Add-FIQ-support.patch | 4 +- ...-irqchip-irq-bcm2835-Add-2836-FIQ-support.patch | 4 +- ...erial-8250-Don-t-crash-when-nr_uarts-is-0.patch | 4 +- ...2835-Set-base-to-0-give-expected-gpio-num.patch | 4 +- ...2835-Fix-interrupt-handling-for-GPIOs-28-.patch | 4 +- ...2835-Only-request-the-interrupts-listed-i.patch | 4 +- ...cm2835-Support-pin-groups-other-than-7-11.patch | 4 +- ...RM-bcm2835-Set-Serial-number-and-Revision.patch | 4 +- ...-get-base-address-for-DMA-from-devicetree.patch | 4 +- ...-add-24bit-support-update-bclk_ratio-to-m.patch | 4 +- ...s-setup-clock-only-if-CPU-is-clock-master.patch | 4 +- ...835-i2s-Eliminate-debugfs-directory-error.patch | 4 +- .../0018-bcm2835-i2s-Register-PCM-device.patch | 4 +- ...i2s-Enable-MMAP-support-via-a-DT-property.patch | 4 +- ...0-dmaengine-bcm2835-Add-slave-dma-support.patch | 4 +- ...ine-bcm2835-set-residue_granularity-field.patch | 4 +- ...cm2835-Load-driver-early-and-support-lega.patch | 4 +- ...-dma-Fix-dreq-not-set-for-slave-transfers.patch | 4 +- ...-Limit-cyclic-transfers-on-lite-channels-.patch | 4 +- .../0025-bcm2835-Add-support-for-uart1.patch | 4 +- ...irmware-bcm2835-Add-missing-property-tags.patch | 4 +- .../0027-Main-bcm2708-bcm2709-linux-port.patch | 4 +- ...-squash-include-ARCH_BCM2708-ARCH_BCM2709.patch | 4 +- .../patches-4.4/0029-Add-dwc_otg-driver.patch | 4 +- .../0030-bcm2708-framebuffer-driver.patch | 4 +- .../0031-dmaengine-Add-support-for-BCM2708.patch | 4 +- ...-parameter-to-mmc-multi_io_quirk-callback.patch | 4 +- .../0033-MMC-added-alternative-MMC-driver.patch| 4 +- ...835-sdhost-driver-and-an-overlay-to-enabl.patch | 4 +- ...ma-Add-vc_cma-driver-to-enable-use-of-CMA.patch | 4 +- .../0036-bcm2708-alsa-sound-driver.patch | 4 +- .../patches-4.4/0037-bcm2708-vchiq-driver.patch| 4 +- .../0038-vc_mem-Add-vc_mem-driver.patch| 4 +- ...deoCore-shared-memory-service-for-BCM2835.patch | 4 +- ...omem-device-for-rootless-user-GPIO-access.patch | 4 +- .../brcm2708/patches-4.4/0041-Add-SMI-driver.patch | 4 +- .../patches-4.4/0042-Add-SMI-NAND-driver.patch | 4 +- ...3-lirc-added-support-for-RaspberryPi-GPIO.patch | 4 +- .../patches-4.4/0044-Add-cpufreq-driver.patch | 4 +- ...-thermal-driver-for-reporting-core-temper.patch | 4 +- .../0046-Add-Chris-Boot-s-i2c-driver.patch | 4 +- .../0047-char-broadcom-Add-vcio-module.patch | 4 +- ...048-firmware-bcm2835-Support-ARCH_BCM270x.patch | 4 +- .../0049-bcm2835-add-v4l2-camera-device.patch | 4 +- ...-mkknlimg-and-knlinfo-scripts-from-tools-.patch | 4 +- ...port-for-the-CONFIG_CMDLINE_EXTEND-option.patch | 4 +- ...0052-BCM2708-Add-core-Device-Tree-support.patch | 4 +- ...3-bcm2835-Match-with-BCM2708-Device-Trees.patch | 4 +- .../0054-fbdev-add-FBIOCOPYAREA-ioctl.patch| 4 +- ...up-console-framebuffer-imageblit-function.patch | 4 +- ...9-Allow-mac-address-to-be-set-in-smsc95xx.patch | 4 +- ...e-realtime-clock-1-wire-chip-DS1307-and-1.patch | 4 +- ...061-Added-Device-IDs-for-August-DVB-T-205.patch | 4 +- ...le-CONFIG_MEMCG-but-leave-it-disabled-due.patch | 4 +- .../0063-ASoC-Add-support-for-PCM5102A-codec.patch | 4 +- .../0064-ASoC-Add-support-for-HifiBerry-DAC.patch | 4 +- .../0065-ASoC-Add-support-for-Rpi-DAC.patch| 4 +- ...-Implement-MCLK-configuration-options-a
[OpenWrt-Devel] [RFC 4/4] brcm2708: add Raspberry Pi 3 support
Signed-off-by: Álvaro Fernández Rojas --- target/linux/brcm2708/Makefile | 8 +- target/linux/brcm2708/bcm2710/config-4.4 | 390 + .../brcm2708/bcm2710/profiles/RaspberryPi3.mk | 14 + target/linux/brcm2708/bcm2710/target.mk| 12 + target/linux/brcm2708/image/Makefile | 12 +- 5 files changed, 429 insertions(+), 7 deletions(-) create mode 100644 target/linux/brcm2708/bcm2710/config-4.4 create mode 100644 target/linux/brcm2708/bcm2710/profiles/RaspberryPi3.mk create mode 100644 target/linux/brcm2708/bcm2710/target.mk diff --git a/target/linux/brcm2708/Makefile b/target/linux/brcm2708/Makefile index f26da4f..112a5b6 100644 --- a/target/linux/brcm2708/Makefile +++ b/target/linux/brcm2708/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2012-2015 OpenWrt.org +# Copyright (C) 2012-2016 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,10 +9,10 @@ include $(INCLUDE_DIR)/host.mk ARCH:=arm BOARD:=brcm2708 -BOARDNAME:=Broadcom BCM2708/BCM2709 +BOARDNAME:=Broadcom BCM27xx FEATURES:=ext4 audio usb usbgadget display gpio fpu MAINTAINER:=Florian Fainelli -SUBTARGETS:=bcm2708 bcm2709 +SUBTARGETS:=bcm2708 bcm2709 bcm2710 KERNEL_PATCHVER:=4.4 @@ -20,7 +20,7 @@ include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += brcm2708-gpu-fw kmod-usb-hid kmod-sound-core kmod-sound-arm-bcm2835 kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 define Target/Description - Build firmware image for Broadcom BCM2708/BCM2709 SoC devices. + Build firmware image for Broadcom BCM27xx SoC devices. Currently produces SD Card image for Raspberry Pi. endef diff --git a/target/linux/brcm2708/bcm2710/config-4.4 b/target/linux/brcm2708/bcm2710/config-4.4 new file mode 100644 index 000..4f81d26 --- /dev/null +++ b/target/linux/brcm2708/bcm2710/config-4.4 @@ -0,0 +1,390 @@ +# CONFIG_AIO is not set +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_AMBA_PL08X is not set +# CONFIG_APM_EMULATION is not set +# CONFIG_ARCH_BCM2708 is not set +CONFIG_ARCH_BCM2709=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +# CONFIG_ARCH_HAS_SG_CHAIN is not set +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +CONFIG_ARCH_NR_GPIO=0 +CONFIG_ARCH_REQUIRE_GPIOLIB=y +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_ARCH_WANT_GENERAL_HUGETLB=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_ARM=y +CONFIG_ARM_AMBA=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_L1_CACHE_SHIFT_6=y +# CONFIG_ARM_LPAE is not set +# CONFIG_ARM_SP805_WATCHDOG is not set +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_UNWIND=y +CONFIG_ARM_VIRT_EXT=y +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_BCM2708_NOL2CACHE=y +CONFIG_BCM2708_VCHIQ=y +CONFIG_BCM2708_VCMEM=y +# CONFIG_BCM2835_DEVGPIOMEM is not set +CONFIG_BCM2835_MBOX=y +# CONFIG_BCM2835_SMI is not set +CONFIG_BCM2835_WDT=y +CONFIG_BCM_VCIO=y +CONFIG_BCM_VC_CMA=y +CONFIG_BCM_VC_SM=y +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +CONFIG_BLK_DEV_SD=y +CONFIG_BRCM_CHAR_DRIVERS=y +CONFIG_BUILD_BIN2C=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLKSRC_OF=y +CONFIG_CLKSRC_PROBE=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_CMA=y +CONFIG_CMA_ALIGNMENT=8 +CONFIG_CMA_AREAS=7 +# CONFIG_CMA_DEBUG is not set +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_SIZE_MBYTES=16 +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +CONFIG_CMDLINE="dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" +CONFIG_COMMON_CLK=y +CONFIG_CONFIGFS_FS=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_HAS_ASID=y +# CONFIG_CPU_ICACHE_DISABLE is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_PM=y +CONFIG_CPU_RMAP=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_V7=y +CONFIG_CRC16=y +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO
[OpenWrt-Devel] current state of kirkwood target in trunk?
Hi, what is the state of the kirkwood targets in openwrt trunk? At the moment I'm trying to get an Segate GoFlex Home running with trunk. I had it previously running with atitude adjustment and wanted to to upgrade it to trunk. Since it seems ubifs is the new way to go, I flashed a new u-boot namely the openwrt-kirkwood-goflexhome-u-boot.kwb. It was missing the bootz command support, so I had to change 200-openwrt-config.patch since it didn't include "openwrt-kirkwood-common.h" for the goflex. diff --git a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch index 0e84d3b..92e2b75 100644 --- a/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch +++ b/package/boot/uboot-kirkwood/patches/200-openwrt-config.patch @@ -108,3 +108,12 @@ +#include "openwrt-kirkwood-common.h" + #endif /* _CONFIG_SHEEVAPLUG_H */ +--- a/include/configs/goflexhome.h b/include/configs/goflexhome.h +@@ -133,4 +133,6 @@ + #define CONFIG_RTC_MV + #endif /* CONFIG_CMD_DATE */ + ++#include "openwrt-kirkwood-common.h" ++ + #endif /* _CONFIG_GOFLEXHOME_H */ After flashing the rootfs: GoFlexHome> nand erase.part root NAND erase.part: device 0 offset 0x70, size 0xf90 Skipping bad block at 0x0d92 Erasing at 0xffe -- 100% complete. OK GoFlexHome> ubi part root UBI: attaching mtd1 to ubi0 UBI: scanning is finished UBI: empty MTD device detected UBI: attached mtd1 (name "mtd=2", size 249 MiB) to ubi0 UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512 UBI: VID header offset: 512 (aligned 512), data offset: 2048 UBI: good PEBs: 1991, bad PEBs: 1, corrupted PEBs: 0 UBI: user volume: 0, internal volumes: 1, max. volumes count: 128 UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 0 UBI: available PEBs: 1948, total reserved PEBs: 43, PEBs reserved for bad PEB handling: 39 GoFlexHome> ubi create rootfs No size specified -> Using max size (251338752) Creating dynamic volume rootfs of size 251338752 GoFlexHome> tftpboot 0x80 dd-gfh/openwrt-kirkwood-goflexhome-rootfs.ubifs Using egiga0 device TFTP from server 10.10.10.3; our IP address is 10.10.10.6 Filename 'dd-gfh/openwrt-kirkwood-goflexhome-rootfs.ubifs'. Load address: 0x80 Loading: # # # # # # # # # # # # # # # # # # # # # # # 529.3 KiB/s done Bytes transferred = 7612416 (742800 hex) GoFlexHome> ubi write 0x80 rootfs 0x742800 7612416 bytes written to volume rootfs GoFlexHome> ubifsmount ubi:rootfs GoFlexHome> ubifsls 3848 Mon Feb 29 13:56:58 2016 bin 160 Sun Feb 28 13:21:54 2016 dev 3256 Sun Feb 28 13:21:54 2016 etc 1720 Sun Feb 28 13:21:54 2016 lib 160 Sun Feb 28 13:21:54 2016 mnt 224 Mon Feb 29 13:56:58 2016 rom 160 Mon Feb 29 13:56:59 2016 tmp 160 Sun Feb 28 13:21:54 2016 sys 4 Mon Feb 29 13:56:58 2016 var 416 Sun Feb 28 13:21:54 2016 usr 160 Sun Feb 28 13:21:54 2016 www 608 Mon Feb 29 13:59:33 2016 boot 160 Sun Feb 28 13:21:54 2016 proc 3024 Mon Feb 29 13:56:58 2016 sbin 160 Sun Feb 28 13:21:54 2016 root
Re: [OpenWrt-Devel] [PATCH v2 05/11] ltq-vdsl-app: make the dsl_control application stop cleanly
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 02/29/2016 06:08 AM, Alexander Couzens wrote: > On Sun, 28 Feb 2016 19:44:28 +0100 Hauke Mehrtens > wrote: > >> I am not calling dsl_cmd because I want to ignore the lock, quit >> should also be send when someone else is accessing it. I saw that >> some other call was stuck here and all following calls were stuck >> in the dsl_cmd lock. >> >> Signed-off-by: Hauke Mehrtens --- >> package/network/config/ltq-vdsl-app/files/dsl_control | 1 + 1 >> file changed, 1 insertion(+) >> >> diff --git >> a/package/network/config/ltq-vdsl-app/files/dsl_control >> b/package/network/config/ltq-vdsl-app/files/dsl_control index >> d7ba622..9c8dbad 100644 --- >> a/package/network/config/ltq-vdsl-app/files/dsl_control +++ >> b/package/network/config/ltq-vdsl-app/files/dsl_control @@ >> -219,6 +219,7 @@ start_service() { } >> >> stop_service() { > > why not adding a comment about the lock? Will add this. > >> +echo quit > /tmp/pipe/dsl_cpe0_cmd >> DSL_NOTIFICATION_TYPE="DSL_INTERFACE_STATUS" \ >> DSL_INTERFACE_STATUS="DOWN" \ /sbin/dsl_notify.sh > > > -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQIcBAEBCAAGBQJW1Me5AAoJEIZ0px9YPRMyCGQP/iGoEhCe+H/PDu26g1+TznC5 2in9K8WEa+tbacUgkj/gFNOF5RTxVZIZ7Y7MOFDkfETZ1oEn/+8Hm4DO7mlJz4x1 VAzMoER/wM1rlK+WEtqbaHh/av86I2Sd6CAKdhiEbXkW3o/q6O4TkWHy6VQO0MXY 8W95ITW5e05BkhdSXlE6RL8MhJWGmZlxT0RsZ2eyHBfIroaJUgpNCD0SPCNzmp/w rTVDlg8Qbz5jHaBiHolUJK2iCRG8CbG/O8qQtxsxhp5129qn6M60zPKp2MsfcX59 ZMSW/2GSB65GP35wTZ1u13wX5VHKpi/eCb4y4ABQZwxI7ow4RK3X9SIqLcfR8O3/ bhmM5gGQ7Ukt0rZkJpBT8hye8a5dA+R290vtj8qh8YleqsULPQyif0kq0LL2qh5v d0FTDpWhgeKiUT78Kit8IEpTg94uIpbQaWdVCmGlcw5Exd2RtRZYXf2RpBhAA9sl GB8aDKtnNChAg0twdh7sVaNJcjOhuSfw02TZH0D17NdDbzhMqn0zvl2UQ68jWMPh WhO1uIl/PEjXXZ8gyIDnkzAs1PhIE3tb6NmkIcA02H0zydB0LOZQSif8Nn57bCF3 64n5U378oHJ2M/RpPAh4gMUjo/K7K/i/tyXkhOBHGWchyI4UizaxvQJWi6CYCDzE PeAfTzQVtB4c7lItIc9S =5OsF -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] GSoC 2016: Freifunk ist dabei/Freifunk made it!
<> Hallo alle, ich freue mich euch zu schreiben zu können, dass unsere Bewerbung als Mentororganisation in diesem Jahr erfolgreich war! Nun liegt eine Menge Arbeit vor uns :-) Falls ihr Studenten kennt, sagt ihnen Bescheid und redet über mögliche Projekte. Die Bewerbungsphase für die Studenten beginnt am 14. März. Falls ihr bei euren Projektideen im Wiki keine Kontaktinformationen abgelegt habt, holt das bitte jetzt nach! Die Studenten sollten sich vor ihrer Bewerbung mit euch über mögliche Projekte austauschen können. Legt z.B. eine Wikiseite zu eurem User an und verlinkt ihn. Viele Grüße Andi --- Dear all, I'm happy to announce: our application was successful! That means a lot of work for us :-) If you know students to work on our projects please tell them and talk to them! The student application period will start on March 14th. If you didn't enter contact information to your idea, please do it now. Students should be able to discuss projects in advance. I.e. you can link your wiki user and add information to the user page. Cheers, Andi ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC] kernel: take bcm47xx_nvram.h from kernel and not backports
compat-wireless/backports now contains a bcm47xx_nvram.h file to backport some of the functions in it which are used by the bcmfmac driver. This file just checks for the kernel versions and provide an empty implementations on older kernel versions. This is OK on most systems, but on bcm47xx / bcm53xx systems we want to call the real functions here. This commit removes the file from backports in our build process like we do it with the bcma and ssb header files. Instead we add a recent version into our kernel so all code uses only one header file. On bcm47xx / bcm53xx the real implementations of this code will be used. Reported-by: Hante Meuleman Signed-off-by: Hauke Mehrtens [Backport of r47467. The recent mac80211 backport was missing this patch, breaking the build of the brcmfmac module] Signed-off-by: Matthias Schiffer --- This fixes the compile failure of the brcmfmac module (and thus ALL_KMODS builds) in CC after the latest mac80211 backport. Compile tested kernel and mac80211 with ALL_KMODS on brcm47xx and bcm53xx. .../bcm53xx/files/include/linux/bcm47xx_nvram.h| 49 ...xx-Move-NVRAM-header-to-the-include-linux.patch | 37 --- ...x-allow-retrieval-of-complete-nvram-conte.patch | 36 --- .../patches-3.18/030-backport_bcm47xx_nvram.patch | 52 ++ 4 files changed, 52 insertions(+), 122 deletions(-) delete mode 100644 target/linux/bcm53xx/files/include/linux/bcm47xx_nvram.h create mode 100644 target/linux/generic/patches-3.18/030-backport_bcm47xx_nvram.patch diff --git a/target/linux/bcm53xx/files/include/linux/bcm47xx_nvram.h b/target/linux/bcm53xx/files/include/linux/bcm47xx_nvram.h deleted file mode 100644 index 2793652..000 --- a/target/linux/bcm53xx/files/include/linux/bcm47xx_nvram.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#ifndef __BCM47XX_NVRAM_H -#define __BCM47XX_NVRAM_H - -#include -#include -#include - -#ifdef CONFIG_BCM47XX_NVRAM -int bcm47xx_nvram_init_from_mem(u32 base, u32 lim); -int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len); -int bcm47xx_nvram_gpio_pin(const char *name); -char *bcm47xx_nvram_get_contents(size_t *val_len); -static inline void bcm47xx_nvram_release_contents(char *nvram) -{ - vfree(nvram); -}; -#else -static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) -{ - return -ENOTSUPP; -}; -static inline int bcm47xx_nvram_getenv(const char *name, char *val, - size_t val_len) -{ - return -ENOTSUPP; -}; -static inline int bcm47xx_nvram_gpio_pin(const char *name) -{ - return -ENOTSUPP; -}; - -static inline char *bcm47xx_nvram_get_contents(size_t *val_len) -{ - return NULL; -}; - -static inline void bcm47xx_nvram_release_contents(char *nvram) -{ -}; -#endif - -#endif /* __BCM47XX_NVRAM_H */ diff --git a/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch b/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch index c1c0927..e9e3873 100644 --- a/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch +++ b/target/linux/brcm47xx/patches-3.18/031-05-MIPS-BCM47xx-Move-NVRAM-header-to-the-include-linux.patch @@ -182,40 +182,3 @@ Signed-off-by: Ralf Baechle #endif #include "ssb_private.h" /dev/null -+++ b/include/linux/bcm47xx_nvram.h -@@ -0,0 +1,34 @@ -+/* -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ */ -+ -+#ifndef __BCM47XX_NVRAM_H -+#define __BCM47XX_NVRAM_H -+ -+#include -+#include -+ -+#ifdef CONFIG_BCM47XX -+int bcm47xx_nvram_init_from_mem(u32 base, u32 lim); -+int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len); -+int bcm47xx_nvram_gpio_pin(const char *name); -+#else -+static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim) -+{ -+ return -ENOTSUPP; -+}; -+static inline int bcm47xx_nvram_getenv(const char *name, char *val, -+ size_t val_len) -+{ -+ return -ENOTSUPP; -+}; -+static inline int bcm47xx_nvram_gpio_pin(const char *name) -+{ -+ return -ENOTSUPP; -+}; -+#endif -+ -+#endif /* __BCM47XX_NVRAM_H */ diff --git a/target/linux/brcm47xx/patches-3.18/032-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch b/target/linux/brcm47xx/patches-3.18/032-08-mips-bcm47xx-allow-retrieval-of-complete-nvram-conte.patch index 105c651..254be46 100644 --- a/target/linux/brcm47xx/
[OpenWrt-Devel] [PATCH CC 00/32] The CC backport wishlist
Hi, nbd asked for suggestions for patches to backport to CC, so here I deliver the set of patches we're currently carrying in Gluon and that I deem worthy for backporting. See below for some additional comments regarding the patches. We also carry two kernel bugfixes backported from 4.x to 3.18. Would you prefer me to send them for the OpenWrt trunk first, or is 3.18 not relevant for the trunk anymore and I should just send them for CC? Thanks, Matthias > ar71xx: add support for tp-link wr740n v5.0 (EU) > ar71xx: add support for TL-WR741ND v5 Trivial hardware support. > sunxi: don't copy DTS files to BIN_DIR > sunxi: fix uboot install location > sunxi: respect CONFIG_TARGET_IMAGES_GZIP Fixes the image builder for sunxi; misc cleanup. > odhcp6c: add option "sourcefilter" to disable source filter Source routing may make the source address selection very non-intuitive. Backport support for the "sourcefilter" option to allow switching of source routing when desired. > base-files: default_postinst: propagate the real postinst return code Required for our sanity-checking postinst scripts. > odhcp6c: minor fixes Significatly reduces the number of spawned processes and thus load/memory consumption in large broadcast domains, especially in networks with multiple radvds. > tools/firmware-utils: tplink-safeloader: clean up code > tools/firmware-utils: tplink-safeloader: fix support-list format, >clean up vendor information > tools/firmware-utils: tplink-safeloader: add version 1.1 support to >CPE210/220/510/520 Add support for CPE210/510... v1.1; misc cleanup. > ar71xx: add support for the TP-LINK TL-WR1043ND v3 Trivial hardware support. > ar71xx: fix AR71XX_MODEL on TP-Link TL-WR703N AR71XX_MODEL fix. > OpenSSL: Added source/old to PKG_SOURCE_URL Allows building older trees without having to fixup the OpenSSL URL (especially annoying when OpenSSL is just a build dep, but not actually used). > firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile >warnings > ar71xx, firmware-utils: split ubdev01 flash layout from XM > firmware-utils: mkfwimage: fix firmware_max_length for XM layout > kernel: disable software protection bits for macronix flash chips at >init These four patches fix compatiblity with the bootloader of AirOS 5.6.x on Airmax M XM/XW devices. > brcm2708-gpu-fw: move pkg build dir to kernel build dir to fix rebuild >bugs after cleaning the kernel tree Build fix. > kernel/gpio_keys: load module on pre-init Fix failsafe mode on WDR4900. > ar71xx/lzma-loader: fix O32 ABI conformance We suspect we might have hit this bug. Although we are still in the process of verifying that this patch actually fixes our issues, applying it certainly doesn't hurt. > ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link >TL-WR841N/ND v9, Compex WPJ531) > ar71xx: rework patch for qca953x/956x > ar71xx: compex wpj531 fix ethernet registration > ar71xx: compex wpj531 fix setting mac address on ethernet > ar71xx: compex wpj531 register usb support QCA953x stability improvents and related fixes. We've had reports of stability issues on TL-WR841 v9 (QCA9533) before adding these patches. We're not sure if they improve the situation, but they don't make it worse. > mac80211: set mcast-rate for mesh point interfaces I'm not sure why this was excluded from the mac80211 backport, but we need this feature. > ar71xx: rename firmware for Chinese version of TL-WR941ND v6 > ar71xx: add support for TP-LINK TL-WR941ND v6 (international version) Prevent people from bricking their devices because of installing the image for the Chinese version... > x86/generic: enable pata_atiixp driver Adds support for devices like the Futro thin-clients. > base-files: add /etc/profile.d support Simple feature, we want to use it. > kernel: add Realtek USB to Ethernet modules Add packages for two kernel modules. package/base-files/files/etc/profile | 7 + package/base-files/files/lib/functions.sh | 10 +- package/boot/uboot-sunxi/Makefile | 15 +- package/kernel/brcm2708-gpu-fw/Makefile| 2 +- package/kernel/linux/modules/input.mk | 2 +- package/kernel/linux/modules/usb.mk| 30 +++ .../mac80211/files/lib/netifd/wireless/mac80211.sh | 14 +- package/libs/openssl/Makefile | 5 +- package/network/ipv6/odhcp6c/Makefile | 4 +- package/network/ipv6/odhcp6c/files/dhcpv6.script | 9 +- package/network/ipv6/odhcp6c/files/dhcpv6.sh | 6 +- target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../ar71xx/base-files/etc/uci-defaults/01_leds | 9 + .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 5 +- .../lib/preinit/05_set_preinit_iface_ar71xx| 1 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3
[OpenWrt-Devel] [PATCH CC 02/32] ar71xx: add support for TL-WR741ND v5
This device is identical to the TL-WR740N v5, it even uses the same HWID (which wasn't the case for older TL-WR741ND revisions). Signed-off-by: Matthias Schiffer Backport of r46238 --- target/linux/ar71xx/image/Makefile | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 1fe88d5..78d35e1 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -531,6 +531,14 @@ define Device/tl-wr741nd-v4 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr741nd-v5 +$(Device/tplink-4mlzma) +BOARDNAME := TL-WR741ND-v4 +DEVICE_PROFILE := TLWR741 +TPLINK_HWID := 0x0745 +CONSOLE := ttyATH0,115200 +endef + define Device/tl-wr743nd-v2 $(Device/tplink-4mlzma) BOARDNAME := TL-WR741ND-v4 @@ -538,7 +546,7 @@ define Device/tl-wr743nd-v2 TPLINK_HWID := 0x07430002 CONSOLE := ttyATH0,115200 endef -TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2 +TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr741nd-v5 tl-wr743nd-v2 define Device/tl-wr841n-v8 $(Device/tplink-4mlzma) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 01/32] ar71xx: add support for tp-link wr740n v5.0 (EU)
TP-Link ships wr740n v5.0 to Romania (so probably everywhere except China) with 4 MB flash and 32 MB memory (confirmed by their local support). This patch adds support for the v5.0 clone of v4, i just tested it on my own v5.0 router and it works. Signed-off-by: Daniel Petre Backport of r46115 --- target/linux/ar71xx/image/Makefile | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 4336697..1fe88d5 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -501,6 +501,14 @@ define Device/tl-wr740n-v4 CONSOLE := ttyATH0,115200 endef +define Device/tl-wr740n-v5 +$(Device/tplink-4mlzma) +BOARDNAME := TL-WR741ND-v4 +DEVICE_PROFILE := TLWR740 +TPLINK_HWID := 0x0745 +CONSOLE := ttyATH0,115200 +endef + define Device/tl-wr741nd-v1 $(Device/tplink-4m) BOARDNAME := TL-WR741ND @@ -530,7 +538,7 @@ define Device/tl-wr743nd-v2 TPLINK_HWID := 0x07430002 CONSOLE := ttyATH0,115200 endef -TARGET_DEVICES += tl-wr740n-v4 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2 +TARGET_DEVICES += tl-wr740n-v4 tl-wr740n-v5 tl-wr741nd-v1 tl-wr741nd-v2 tl-wr741nd-v4 tl-wr743nd-v2 define Device/tl-wr841n-v8 $(Device/tplink-4mlzma) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 03/32] sunxi: don't copy DTS files to BIN_DIR
The DTS files aren't useful (other targets don't copy them either) and clutter BIN_DIR with files unrelated to the chosen profile. Signed-off-by: Matthias Schiffer Backport of r46604 --- target/linux/sunxi/image/Makefile | 30 +- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 6fcd61f..b96a360 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -11,28 +11,12 @@ include $(INCLUDE_DIR)/host.mk FAT32_BLOCK_SIZE=1024 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE -BOARDS:= \ - sun4i-a10-cubieboard \ - sun4i-a10-olinuxino-lime \ - sun4i-a10-pcduino \ - sun5i-a13-olinuxino \ - sun6i-a31-colombus \ - sun6i-a31-m9 \ - sun7i-a20-bananapi \ - sun7i-a20-bananapro \ - sun7i-a20-cubieboard2 \ - sun7i-a20-cubietruck \ - sun7i-a20-olinuxino-lime \ - sun7i-a20-olinuxino-micro \ - sun7i-a20-pcduino3 \ - sun7i-a20-lamobo-r1 - define Image/BuildKernel mkimage -A arm -O linux -T kernel -C none \ -a 0x40008000 -e 0x40008000 \ -n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \ -d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage - + ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) $(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs @@ -42,20 +26,16 @@ define Image/BuildKernel $(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \ ) endif - - $(foreach board,$(BOARDS), - $(CP) $(DTS_DIR)/$(board).dtb $(BIN_DIR)/ - ) endef define Image/Build/SDCard rm -f $(KDIR)/boot.img mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) - + mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(2).dtb ::dtb + mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage - + ./gen_sunxi_sdcard_img.sh \ $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img \ $(KDIR)/boot.img \ @@ -124,7 +104,7 @@ endef define Image/Build $(call Image/Build/$(1),$(1)) $(call Image/Build/Profile/$(PROFILE),$(1)) - + dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync endef -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 04/32] sunxi: fix uboot install location
Install uboot files to KERNEL_BUILD_DIR instead of BIN_DIR to fix ImageBuilder. Similar fixes are necessary for many (all?) other uboot targets. Signed-off-by: Matthias Schiffer Backport of r46605 --- package/boot/uboot-sunxi/Makefile | 15 --- target/linux/sunxi/image/Makefile | 4 ++-- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 14ba922..9032600 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -6,6 +6,7 @@ # include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=u-boot PKG_VERSION:=2015.01 @@ -16,7 +17,7 @@ PKG_SOURCE_URL:= \ PKG_MD5SUM:=7f08dc9e98a71652bd696ed6ec95 -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE_FILES:=Licenses/README @@ -136,16 +137,16 @@ define Build/Compile endef define Package/uboot/install/default - $(INSTALL_DIR) $(BIN_DIR)/uboot-$(BOARD)-$(1) $(CP) $(PKG_BUILD_DIR)/u-boot.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot.bin $(CP) $(PKG_BUILD_DIR)/spl/sunxi-spl.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-spl.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-spl.bin $(CP) $(PKG_BUILD_DIR)/u-boot-sunxi-with-spl.bin \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-u-boot-with-spl.bin + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-u-boot-with-spl.bin $(CP) uEnv.txt \ - $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt - mkimage -C none -A arm -T script -d $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-uEnv.txt $(BIN_DIR)/uboot-$(BOARD)-$(1)/openwrt-$(BOARD)-$(1)-boot.scr + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt + mkimage -C none -A arm -T script -d $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-uEnv.txt \ + $(KERNEL_BUILD_DIR)/uboot-$(BOARD)-$(1)-boot.scr endef define Package/uboot/install/template diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index b96a360..19ab935 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -32,7 +32,7 @@ define Image/Build/SDCard rm -f $(KDIR)/boot.img mkdosfs $(KDIR)/boot.img -C $(FAT32_BLOCKS) - mcopy -i $(KDIR)/boot.img $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-boot.scr ::boot.scr + mcopy -i $(KDIR)/boot.img $(KDIR)/uboot-sunxi-$(PROFILE)-boot.scr ::boot.scr mcopy -i $(KDIR)/boot.img $(DTS_DIR)/$(2).dtb ::dtb mcopy -i $(KDIR)/boot.img $(BIN_DIR)/$(IMG_PREFIX)-uImage ::uImage @@ -42,7 +42,7 @@ define Image/Build/SDCard $(KDIR)/root.$(1) \ $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ - $(BIN_DIR)/uboot-sunxi-$(PROFILE)/$(IMG_PREFIX)-$(PROFILE)-u-boot-with-spl.bin + $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin endef define Image/Build/Profile/A10-OLinuXino-Lime -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 05/32] sunxi: respect CONFIG_TARGET_IMAGES_GZIP
Signed-off-by: Matthias Schiffer Backport of r46608 --- target/linux/sunxi/image/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile index 19ab935..d3f4409 100644 --- a/target/linux/sunxi/image/Makefile +++ b/target/linux/sunxi/image/Makefile @@ -43,6 +43,10 @@ define Image/Build/SDCard $(CONFIG_SUNXI_SD_BOOT_PARTSIZE) \ $(CONFIG_TARGET_ROOTFS_PARTSIZE) \ $(KDIR)/uboot-sunxi-$(PROFILE)-u-boot-with-spl.bin + + ifneq ($(CONFIG_TARGET_IMAGES_GZIP),) + gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE)-sdcard-vfat-$(1).img + endif endef define Image/Build/Profile/A10-OLinuXino-Lime -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 06/32] odhcp6c: add option "sourcefilter" to disable source filter
Signed-off-by: Steven Barth Backport of r46408 --- package/network/ipv6/odhcp6c/Makefile| 2 +- package/network/ipv6/odhcp6c/files/dhcpv6.script | 2 +- package/network/ipv6/odhcp6c/files/dhcpv6.sh | 6 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 5bf43bd..75de54c 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_VERSION:=2015-07-13 +PKG_VERSION:=2015-07-18 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index b8cbddb..33f6d9b 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -76,7 +76,7 @@ setup_interface () { done for entry in $RA_ROUTES; do - local duplicate=0 + local duplicate=$NOSOURCEFILTER local addr="${entry%%/*}" entry="${entry#*/}" local mask="${entry%%,*}" diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index adcb100..4a453fd 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -28,14 +28,15 @@ proto_dhcpv6_init_config() { proto_config_add_boolean delegate proto_config_add_int "soltimeout" proto_config_add_boolean fakeroutes + proto_config_add_boolean sourcefilter } proto_dhcpv6_setup() { local config="$1" local iface="$2" - local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes - json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes + local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter + json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone soltimeout fakeroutes sourcefilter # Configure @@ -76,6 +77,7 @@ proto_dhcpv6_setup() { [ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat" [ -n "$zone" ] && proto_export "ZONE=$zone" [ "$fakeroutes" != "0" ] && proto_export "FAKE_ROUTES=1" + [ "$sourcefilter" = "0" ] && proto_export "NOSOURCEFILTER=1" proto_export "INTERFACE=$config" proto_run_command "$config" odhcp6c \ -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 07/32] base-files: default_postinst: propagate the real postinst return code
Using the postinst script for sanity checks and expecting opkg to fail if the postinst didn't return 0 was possible in Barrier Breaker, propagate the real postinst return code through default_postinst to restore this behaviour. Signed-off-by: Matthias Schiffer Backport of r46653 --- package/base-files/files/lib/functions.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh index 8d045fa..2f78d67 100755 --- a/package/base-files/files/lib/functions.sh +++ b/package/base-files/files/lib/functions.sh @@ -174,7 +174,8 @@ default_prerm() { } default_postinst() { - local pkgname rusers + local pkgname rusers ret + ret=0 pkgname=$(basename ${1%.*}) rusers=$(grep "Require-User:" ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.control) [ -n "$rusers" ] && { @@ -215,7 +216,10 @@ default_postinst() { done } - [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ] && ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ) + if [ -f ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ]; then + ( . ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.postinst-pkg ) + ret=$? + fi [ -n "${IPKG_INSTROOT}" ] || rm -f /tmp/luci-indexcache 2>/dev/null [ "$PKG_UPGRADE" = "1" ] || for i in `cat ${IPKG_INSTROOT}/usr/lib/opkg/info/${pkgname}.list | grep "^/etc/init.d/"`; do @@ -225,7 +229,7 @@ default_postinst() { $i start } done - return 0 + return $ret } include() { -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 08/32] odhcp6c: minor fixes
Better synchronize RA & DHCPv6 events Accumulate some events to avoid flooding Restart softwires for address and prefix changes Signed-off-by: Steven Barth Backport of r46518 --- package/network/ipv6/odhcp6c/Makefile| 4 ++-- package/network/ipv6/odhcp6c/files/dhcpv6.script | 7 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 75de54c..aa81e02 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_VERSION:=2015-07-18 +PKG_VERSION:=2015-07-29 PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE_URL:=https://github.com/sbyx/odhcp6c.git PKG_SOURCE_PROTO:=git -PKG_SOURCE_VERSION:=024525798c5f6aba3af9b2ef7b3af2f3c14f1db8 +PKG_SOURCE_VERSION:=dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9 PKG_MAINTAINER:=Steven Barth PKG_LICENSE:=GPL-2.0 diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script index 33f6d9b..677d35f 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.script +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -5,6 +5,8 @@ setup_interface () { local device="$1" + local prefsig="" + local addrsig="" proto_init_update "*" 1 # Merge RA-DNS @@ -34,6 +36,7 @@ setup_interface () { for prefix in $PREFIXES; do proto_add_ipv6_prefix "$prefix" + prefsig="$prefsig ${prefix%%,*}" local entry="${prefix#*/}" entry="${entry#*,}" entry="${entry#*,}" @@ -68,6 +71,7 @@ setup_interface () { local valid="${entry%%,*}" proto_add_ipv6_address "$addr" "$mask" "$preferred" "$valid" 1 + addrsig="$addrsig $addr/$mask" if [ -z "$RA_ADDRESSES" -a -z "$RA_ROUTES" -a \ -z "$RA_DNS" -a "$FAKE_ROUTES" = 1 ]; then @@ -136,6 +140,8 @@ setup_interface () { json_add_string ifname "@$INTERFACE" json_add_string proto map json_add_string type "$MAPTYPE" + json_add_string _prefsig "$prefsig" + [ "$MAPTYPE" = lw4o6 ] && json_add_string _addrsig "$addrsig" json_add_string rule "$MAPRULE" json_add_string tunlink "$INTERFACE" [ -n "$ZONE_MAP" ] || ZONE_MAP=$ZONE @@ -163,6 +169,7 @@ setup_interface () { json_add_string ifname "@$INTERFACE" json_add_string proto "464xlat" json_add_string tunlink "$INTERFACE" + json_add_string _addrsig "$addrsig" [ -n "$ZONE_464XLAT" ] || ZONE_464XLAT=$ZONE [ -n "$ZONE_464XLAT" ] && json_add_string zone "$ZONE_464XLAT" [ -n "$IFACE_464XLAT_DELEGATE" ] && json_add_boolean delegate "$IFACE_464XLAT_DELEGATE" -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 09/32] tools/firmware-utils: tplink-safeloader: clean up code
There is no reason for the internal functions not to be static. Signed-off-by: Matthias Schiffer Backport of r47210 --- tools/firmware-utils/src/tplink-safeloader.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 9c5bb54..4607a1d 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -152,7 +152,7 @@ static const unsigned char cpe510_support_list[] = /** Allocates a new image partition */ -struct image_partition_entry alloc_image_partition(const char *name, size_t len) { +static struct image_partition_entry alloc_image_partition(const char *name, size_t len) { struct image_partition_entry entry = {name, len, malloc(len)}; if (!entry.data) error(1, errno, "malloc"); @@ -161,12 +161,12 @@ struct image_partition_entry alloc_image_partition(const char *name, size_t len) } /** Frees an image partition */ -void free_image_partition(struct image_partition_entry entry) { +static void free_image_partition(struct image_partition_entry entry) { free(entry.data); } /** Generates the partition-table partition */ -struct image_partition_entry make_partition_table(const struct flash_partition_entry *p) { +static struct image_partition_entry make_partition_table(const struct flash_partition_entry *p) { struct image_partition_entry entry = alloc_image_partition("partition-table", 0x800); char *s = (char *)entry.data, *end = (char *)(s+entry.size); @@ -202,7 +202,7 @@ static inline uint8_t bcd(uint8_t v) { /** Generates the soft-version partition */ -struct image_partition_entry make_soft_version(uint32_t rev) { +static struct image_partition_entry make_soft_version(uint32_t rev) { struct image_partition_entry entry = alloc_image_partition("soft-version", sizeof(struct soft_version)); struct soft_version *s = (struct soft_version *)entry.data; @@ -233,14 +233,14 @@ struct image_partition_entry make_soft_version(uint32_t rev) { } /** Generates the support-list partition */ -struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) { +static struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) { struct image_partition_entry entry = alloc_image_partition("support-list", len); memcpy(entry.data, support_list, len); return entry; } /** Creates a new image partition with an arbitrary name from a file */ -struct image_partition_entry read_file(const char *part_name, const char *filename, bool add_jffs2_eof) { +static struct image_partition_entry read_file(const char *part_name, const char *filename, bool add_jffs2_eof) { struct stat statbuf; if (stat(filename, &statbuf) < 0) @@ -300,7 +300,7 @@ struct image_partition_entry read_file(const char *part_name, const char *filena I think partition-table must be the first partition in the firmware image. */ -void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts) { +static void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts) { size_t i; char *image_pt = (char *)buffer, *end = image_pt + 0x800; @@ -325,7 +325,7 @@ void put_partitions(uint8_t *buffer, const struct image_partition_entry *parts) } /** Generates and writes the image MD5 checksum */ -void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) { +static void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) { MD5_CTX ctx; MD5_Init(&ctx); @@ -349,7 +349,7 @@ void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) { 1014-1813Image partition table (2048 bytes, padded with 0xff) 1814-Firmware partitions */ -void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) { +static void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) { *len = 0x1814; size_t i; @@ -381,7 +381,7 @@ void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, co should be generalized when TP-LINK starts building its safeloader into hardware with different flash layouts. */ -void * generate_sysupgrade_image(const struct flash_partition_entry *flash_parts, const struct image_partition_entry *image_parts, size_t *len) { +static void * generate_sysupgrade_image(const struct flash_partition_entry *flash_parts, const struct image_partition_entry *image_parts, size_t *len) { const struct flash_partition_entry *flash_os_image = &flash_parts[5]; const struct flash_partition_entry *flash_soft_version = &flash_parts[6]; const struct flash_partition_entry *flash_support_li
[OpenWrt-Devel] [PATCH CC 11/32] tools/firmware-utils: tplink-safeloader: add version 1.1 support to CPE210/220/510/520
The hardware is identical to version 1.0, add the new models to the support list. Also remove the empty line at the end of the support list, the current stock images don't have it either. Signed-off-by: Matthias Schiffer Backport of r47212 --- tools/firmware-utils/src/tplink-safeloader.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 66658aa..77a894b 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -129,17 +129,17 @@ static const struct flash_partition_entry cpe510_partitions[] = { /** The support list for CPE210/220/510/520 - - The stock images also contain strings for two more devices: BS510 and BS210. - At the moment, there exists no public information about these devices. */ static const char cpe510_support_list[] = "SupportList:\r\n" "CPE510(TP-LINK|UN|N300-5):1.0\r\n" + "CPE510(TP-LINK|UN|N300-5):1.1\r\n" "CPE520(TP-LINK|UN|N300-5):1.0\r\n" + "CPE520(TP-LINK|UN|N300-5):1.1\r\n" "CPE210(TP-LINK|UN|N300-2):1.0\r\n" + "CPE210(TP-LINK|UN|N300-2):1.1\r\n" "CPE220(TP-LINK|UN|N300-2):1.0\r\n" - "\r\n"; + "CPE220(TP-LINK|UN|N300-2):1.1\r\n"; #define error(_ret, _errno, _str, ...) \ do {\ -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 10/32] tools/firmware-utils: tplink-safeloader: fix support-list format, clean up vendor information
The first 4 bytes of the support list and the vendor information are supposed to contain the length of these fields. Signed-off-by: Matthias Schiffer Backport of r47211 --- tools/firmware-utils/src/tplink-safeloader.c | 47 ++-- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 4607a1d..66658aa 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -103,7 +103,7 @@ static const uint8_t md5_salt[16] = { /** Vendor information for CPE210/220/510/520 */ -static const unsigned char cpe510_vendor[] = "\x00\x00\x00\x1f""CPE510(TP-LINK|UN|N300-5):1.0\r\n"; +static const char cpe510_vendor[] = "CPE510(TP-LINK|UN|N300-5):1.0\r\n"; /** @@ -133,14 +133,13 @@ static const struct flash_partition_entry cpe510_partitions[] = { The stock images also contain strings for two more devices: BS510 and BS210. At the moment, there exists no public information about these devices. */ -static const unsigned char cpe510_support_list[] = - "\x00\x00\x00\xc8\x00\x00\x00\x00" +static const char cpe510_support_list[] = "SupportList:\r\n" "CPE510(TP-LINK|UN|N300-5):1.0\r\n" "CPE520(TP-LINK|UN|N300-5):1.0\r\n" "CPE210(TP-LINK|UN|N300-2):1.0\r\n" "CPE220(TP-LINK|UN|N300-2):1.0\r\n" - "\r\n\xff"; + "\r\n"; #define error(_ret, _errno, _str, ...) \ do {\ @@ -151,6 +150,14 @@ static const unsigned char cpe510_support_list[] = } while (0) +/** Stores a uint32 as big endian */ +static inline void put32(uint8_t *buf, uint32_t val) { + buf[0] = val >> 24; + buf[1] = val >> 16; + buf[2] = val >> 8; + buf[3] = val; +} + /** Allocates a new image partition */ static struct image_partition_entry alloc_image_partition(const char *name, size_t len) { struct image_partition_entry entry = {name, len, malloc(len)}; @@ -233,9 +240,15 @@ static struct image_partition_entry make_soft_version(uint32_t rev) { } /** Generates the support-list partition */ -static struct image_partition_entry make_support_list(const unsigned char *support_list, size_t len) { - struct image_partition_entry entry = alloc_image_partition("support-list", len); - memcpy(entry.data, support_list, len); +static struct image_partition_entry make_support_list(const char *support_list) { + size_t len = strlen(support_list); + struct image_partition_entry entry = alloc_image_partition("support-list", len + 9); + + put32(entry.data, len); + memset(entry.data+4, 0, 4); + memcpy(entry.data+8, support_list, len); + entry.data[len+8] = '\xff'; + return entry; } @@ -344,12 +357,13 @@ static void put_md5(uint8_t *md5, uint8_t *buffer, unsigned int len) { --- - -0003Image size (4 bytes, big endian) 0004-0013MD5 hash (hash of a 16 byte salt and the image data starting with byte 0x14) - 0014-1013Vendor information (4096 bytes, padded with 0xff; there seem to be older + 0014-0017Vendor information length (without padding) (4 bytes, big endian) + 0018-1013Vendor information (4092 bytes, padded with 0xff; there seem to be older (VxWorks-based) TP-LINK devices which use a smaller vendor information block) 1014-1813Image partition table (2048 bytes, padded with 0xff) 1814-Firmware partitions */ -static void * generate_factory_image(const unsigned char *vendor, size_t vendor_len, const struct image_partition_entry *parts, size_t *len) { +static void * generate_factory_image(const char *vendor, const struct image_partition_entry *parts, size_t *len) { *len = 0x1814; size_t i; @@ -360,13 +374,12 @@ static void * generate_factory_image(const unsigned char *vendor, size_t vendor_ if (!image) error(1, errno, "malloc"); - image[0] = *len >> 24; - image[1] = *len >> 16; - image[2] = *len >> 8; - image[3] = *len; + put32(image, *len); - memcpy(image+0x14, vendor, vendor_len); - memset(image+0x14+vendor_len, 0xff, 4096-vendor_len); + size_t vendor_len = strlen(vendor); + put32(image+0x14, vendor_len); + memcpy(image+0x18, vendor, vendor_len); + memset(image+0x18+vendor_len, 0xff, 4092-vendor_len); put_partitions(image + 0x1014, parts); put_md5(image+0x04, image+0x14, *len-0x14); @@ -430,7 +443,7 @@ static void do_cpe510(const char *output, const char *kernel_image, const char * parts[0] = make_partition_table(cpe510_partitions); parts[1] = make_soft_version(rev); - parts[2] = make_support_list(cpe510_support_list, sizeof(cpe510_support_list)-1); + parts[2] = make_supp
[OpenWrt-Devel] [PATCH CC 12/32] ar71xx: add support for the TP-LINK TL-WR1043ND v3
The hardware of the v3 is identical to the v2. Based-on-patch-by: Andreas Ziegler Signed-off-by: Matthias Schiffer Backport of r47406 --- target/linux/ar71xx/image/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 78d35e1..d28d6b3 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -2023,6 +2023,7 @@ $(eval $(call SingleProfile,TPLINK,64kraw,TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,tt $(eval $(call SingleProfile,TPLINK,64kraw,TLWR1043V1,tl-wr1043nd-v1,TL-WR1043ND,ttyS0,115200,0x10430001,1,8M)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V2,tl-wr1043nd-v2,TL-WR1043ND-v2,ttyS0,115200,0x10430002,1,8M)) +$(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR1043V3,tl-wr1043nd-v3,TL-WR1043ND-v2,ttyS0,115200,0x10430003,1,8M)) $(eval $(call SingleProfile,TPLINK-LZMA,64kraw,TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99)) $(eval $(call SingleProfile,TPLINK-SAFELOADER,64kraw,CPE510,cpe210-220-510-520,CPE510,ttyS0,115200,$$(cpe510_mtdlayout),CPE510)) @@ -2087,7 +2088,7 @@ $(eval $(call MultiProfile,TLWR743,TLWR743NV1)) $(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7)) $(eval $(call MultiProfile,TLWR842,TLWR842V1)) $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4)) -$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2)) +$(eval $(call MultiProfile,TLWR1043,TLWR1043V1 TLWR1043V2 TLWR1043V3)) $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4300V1IL TLWDR4310V1 MW4530RV1)) $(eval $(call MultiProfile,TUBE2H,TUBE2H8M TUBE2H16M)) $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTROCKETMXW UBNTNANOM UBNTNANOMXW UBNTLOCOXW UBNTUNIFI UBNTUNIFIOUTDOOR UBNTUNIFIOUTDOORPLUS UAPPRO UBNTAIRGW)) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 13/32] ar71xx: fix AR71XX_MODEL on TP-Link TL-WR703N
The hwid check was wrong, causing the AR71XX_MODEL value to end with a space (as $hwver was unset). Signed-off-by: Matthias Schiffer Backport of r47553 --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 0b2857d..f1f5561 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -123,7 +123,7 @@ tplink_board_detect() { "3C0002"*) model="MINIBOX_V1" ;; - "070300"*) + "070301"*) model="TP-Link TL-WR703N" ;; "071000"*) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 18/32] kernel: disable software protection bits for macronix flash chips at init
Signed-off-by: Felix Fietkau Backport r47626 --- .../462-m25p80-mx-disable-software-protection.patch| 10 ++ 1 file changed, 10 insertions(+) create mode 100644 target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch diff --git a/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch b/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch new file mode 100644 index 000..d7d7eec --- /dev/null +++ b/target/linux/generic/patches-3.18/462-m25p80-mx-disable-software-protection.patch @@ -0,0 +1,10 @@ +--- a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +@@ -962,6 +962,7 @@ int spi_nor_scan(struct spi_nor *nor, co + + if (JEDEC_MFR(info->jedec_id) == CFI_MFR_ATMEL || + JEDEC_MFR(info->jedec_id) == CFI_MFR_INTEL || ++ JEDEC_MFR(info->jedec_id) == CFI_MFR_MACRONIX || + JEDEC_MFR(info->jedec_id) == CFI_MFR_SST) { + write_enable(nor); + write_sr(nor, 0); -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 20/32] kernel/gpio_keys: load module on pre-init
fix rescue mode on wdr4900 Signed-off-by: Alexander Couzens Backport of r48793 --- package/kernel/linux/modules/input.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/linux/modules/input.mk b/package/kernel/linux/modules/input.mk index 86ff33c..eed9aa2 100644 --- a/package/kernel/linux/modules/input.mk +++ b/package/kernel/linux/modules/input.mk @@ -75,7 +75,7 @@ define KernelPackage/input-gpio-keys CONFIG_KEYBOARD_GPIO \ CONFIG_INPUT_KEYBOARD=y FILES:=$(LINUX_DIR)/drivers/input/keyboard/gpio_keys.ko - AUTOLOAD:=$(call AutoProbe,gpio_keys) + AUTOLOAD:=$(call AutoProbe,gpio_keys,1) endef define KernelPackage/input-gpio-keys/description -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 21/32] ar71xx/lzma-loader: fix O32 ABI conformance
According to the calling convention of the o32 ABI the caller function must reserve stack space for $a0-$a3 registers in case the callee needs to save its arguments. The assembly code of the loader does not reserve stack space for these registers thus when the 'loader_main' function needs to save its arguments, those will be stored in the 'workspace' area instead of the stack. Because the workspace area is also used by other part of the code, the saved register values gets overwritten and this often leads to failed kernel boots. Fix the code to reserve stack space for the registers to avoid this error. Signed-off-by: Gabor Juhos Backport of r48279 --- target/linux/ar71xx/image/lzma-loader/src/head.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/ar71xx/image/lzma-loader/src/head.S b/target/linux/ar71xx/image/lzma-loader/src/head.S index 543996a..47a7c9b 100644 --- a/target/linux/ar71xx/image/lzma-loader/src/head.S +++ b/target/linux/ar71xx/image/lzma-loader/src/head.S @@ -109,6 +109,9 @@ __bss_check: /* Setup new "C" stack */ la sp, _stack + /* reserve stack space for a0-a3 registers */ + subusp, 16 + /* jump to the decompressor routine */ la t0, loader_main jr t0 -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 22/32] ar71xx: fix ethernet initialization on QCA953x-based boards (TP-Link TL-WR841N/ND v9, Compex WPJ531)
The initialization routines for these boards were relying on some (wrong) defaults for the QCA953x ethernet. Make these defaults explicit to prevent breaking them when the QCA953x defaults are fixed. Signed-off-by: Matthias Schiffer Backport of r46206 --- target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c | 6 ++ target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 7 +++ 2 files changed, 13 insertions(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c index c28afc6..3e5c2a2 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v9.c @@ -109,12 +109,18 @@ static void __init tl_ap143_setup(void) ath79_register_mdio(0, 0x0); /* LAN */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 0); ath79_register_eth(1); /* WAN */ ath79_switch_data.phy4_mii_en = 1; ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.phy_mask = BIT(4); ath79_init_mac(ath79_eth0_data.mac_addr, mac, 1); ath79_register_eth(0); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index bc13d70..e665a2e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -105,12 +105,19 @@ static void __init common_setup(void) ath79_register_mdio(0, 0x0); /* LAN */ + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.phy_mask = BIT(4); ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); ath79_register_eth(0); /* WAN */ ath79_switch_data.phy4_mii_en = 1; + ath79_eth1_data.duplex = DUPLEX_FULL; ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth1_data.speed = SPEED_100; + ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); ath79_register_eth(1); -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 24/32] ar71xx: compex wpj531 fix ethernet registration
In fb6f62e97733312053ab593fcf68eea47a21169e several settings are set on the ethernet device, but they are not working. Fix Ethernet by setting the right values. Signed-off-by: Christian Mehlis Backport of r46281 --- target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index e665a2e..b106917 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -115,8 +115,8 @@ static void __init common_setup(void) /* WAN */ ath79_switch_data.phy4_mii_en = 1; ath79_eth1_data.duplex = DUPLEX_FULL; - ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_MII; - ath79_eth1_data.speed = SPEED_100; + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.speed = SPEED_1000; ath79_switch_data.phy_poll_mask |= BIT(4); ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); ath79_register_eth(1); -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 26/32] ar71xx: compex wpj531 register usb support
Signed-off-by: Christian Mehlis Backport of r46283 --- target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index 2cc2fe8..8a238da 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -123,6 +123,7 @@ static void __init common_setup(void) ath79_register_wmac(art + WPJ531_WMAC_CALDATA_OFFSET, NULL); ath79_register_pci(); + ath79_register_usb(); } static void __init wpj531_setup(void) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 23/32] ar71xx: rework patch for qca953x/956x
Patch cherry-picked from the following location: https://www.codeaurora.org/cgit/quic/qsdk/oss/system/openwrt/commit/?h=release/coconut_ioe4531_2.0&id=5c357bf6c763e4140dddcc9a3bc5f005525a9c0e Changelist, - add more register defines - add EHCI support - fix GPIO pin count to 18 - fix chained irq disabled - fix GMAC0/GMAC1 initial - fix WMAC irq number to 47 - merge the changes of dev-eth.c from the patch to file. Signed-off-by: Miaoqing Pan Signed-off-by: Matthias Schiffer Backport of r46207 --- .../linux/ar71xx/files/arch/mips/ath79/dev-eth.c | 18 +- ...07-MIPS-ath79-add-support-for-QCA953x-SoC.patch | 300 - ...35-MIPS-ath79-add-support-for-QCA956x-SoC.patch | 113 ++-- .../736-MIPS-ath79-fix-chained-irq-disable.patch | 21 +- 4 files changed, 339 insertions(+), 113 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c index ae3db4c..ff94e2e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/dev-eth.c @@ -198,6 +198,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask) case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: mdio_dev = &ath79_mdio1_device; mdio_data = &ath79_mdio1_data; break; @@ -256,6 +258,8 @@ void __init ath79_register_mdio(unsigned int id, u32 phy_mask) break; case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: mdio_data->builtin_switch = 1; break; @@ -571,6 +575,8 @@ static void __init ath79_init_eth_pll_data(unsigned int id) case ATH79_SOC_QCA9533: case ATH79_SOC_QCA9556: case ATH79_SOC_QCA9558: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pll_10 = AR934X_PLL_VAL_10; pll_100 = AR934X_PLL_VAL_100; pll_1000 = AR934X_PLL_VAL_1000; @@ -627,6 +633,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->phy_if_mode = PHY_INTERFACE_MODE_MII; break; @@ -687,7 +695,8 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR7241: case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: - case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->phy_if_mode = PHY_INTERFACE_MODE_GMII; break; @@ -697,6 +706,7 @@ static int __init ath79_setup_phy_if_mode(unsigned int id, case ATH79_SOC_AR9341: case ATH79_SOC_AR9342: case ATH79_SOC_AR9344: + case ATH79_SOC_QCA9533: switch (pdata->phy_if_mode) { case PHY_INTERFACE_MODE_MII: case PHY_INTERFACE_MODE_GMII: @@ -986,6 +996,7 @@ void __init ath79_register_eth(unsigned int id) case ATH79_SOC_AR9341: case ATH79_SOC_AR9342: case ATH79_SOC_AR9344: + case ATH79_SOC_QCA9533: if (id == 0) { pdata->reset_bit = AR934X_RESET_GE0_MAC | AR934X_RESET_GE0_MDIO; @@ -1017,7 +1028,8 @@ void __init ath79_register_eth(unsigned int id) pdata->fifo_cfg3 = 0x01f00140; break; - case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: if (id == 0) { pdata->reset_bit = AR933X_RESET_GE0_MAC | AR933X_RESET_GE0_MDIO; @@ -1123,6 +1135,8 @@ void __init ath79_register_eth(unsigned int id) case ATH79_SOC_AR9330: case ATH79_SOC_AR9331: case ATH79_SOC_QCA9533: + case ATH79_SOC_QCA9561: + case ATH79_SOC_TP9343: pdata->mii_bus_dev = &ath79_mdio1_device.dev; break; diff --git a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch index f3b4446..cf10af3 100644 --- a/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch +++ b/target/linux/ar71xx/patches-3.18/707-MIPS-ath79-add-support-for-QCA953x-SoC.patch @@ -175,6 +175,48 @@ meaning of the bits CPUCLK_FROM_CPUPLL and DDRCLK_FROM_DDRPLL is reversed. soc_is_qca955x()) { at
[OpenWrt-Devel] [PATCH CC 28/32] ar71xx: rename firmware for Chinese version of TL-WR941ND v6
It seems there are two *different* versions on TL-WR941ND v6: Chinese and European one. Currently supported by OpenWrt is Chinese one. Rename firmware to make it clear. For details see: http://wiki.openwrt.org/toh/tp-link/tl-wr941nd https://forum.openwrt.org/viewtopic.php?id=59295 Signed-off-by: Rafał Miłecki Backport of r47107 --- target/linux/ar71xx/image/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index 05ef1d2..24c60f5 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -598,13 +598,14 @@ define Device/tl-wr941nd-v5 TPLINK_HWID := 0x09410005 endef -define Device/tl-wr941nd-v6 +# Chinese version (unlike European) is similar to the TL-WDR3500 +define Device/tl-wr941nd-v6-cn $(Device/tplink-4mlzma) BOARDNAME := TL-WDR3500 DEVICE_PROFILE := TLWR941 TPLINK_HWID := 0x09410006 endef -TARGET_DEVICES += tl-wr941nd-v5 tl-wr941nd-v6 +TARGET_DEVICES += tl-wr941nd-v5 tl-wr941nd-v6-cn define Device/tl-wr1041n-v2 $(Device/tplink-4mlzma) -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 14/32] OpenSSL: Added source/old to PKG_SOURCE_URL
OpenSSL moves old versions of the library from http://www.openssl.org/source/ to http://www.openssl.org/source/old/$version/ breaking the old links. That behavior breaks the OpenWRT-build every time OpenSSL releases a new version. This patch adds http://www.openssl.org/source/old/$version/ to the PKG_SOURCE_URL of OpenSSL to avoid breaking the build whenever OpenSSL releases a new version. Signed-off-by: Kevin Kirsch Reviewed-by: Alexander Dahl Backport of r47860 --- package/libs/openssl/Makefile | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile index ad93678..8cd32a7 100644 --- a/package/libs/openssl/Makefile +++ b/package/libs/openssl/Makefile @@ -8,7 +8,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssl -PKG_VERSION:=1.0.2f +PKG_BASE:=1.0.2 +PKG_BUGFIX:=f +PKG_VERSION:=$(PKG_BASE)$(PKG_BUGFIX) PKG_RELEASE:=1 PKG_USE_MIPS16:=0 @@ -16,6 +18,7 @@ PKG_BUILD_PARALLEL:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.openssl.org/source/ \ + http://www.openssl.org/source/old/$(PKG_BASE)/ \ ftp://ftp.funet.fi/pub/crypt/mirrors/ftp.openssl.org/source \ ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/ PKG_MD5SUM:=b3bf73f507172be9292ea2a8c28b659d -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 27/32] mac80211: set mcast-rate for mesh point interfaces
In order to set the multicast rate for mesh point interfaces the "mesh join" was made explicit and moved to mac80211_setup_vif(), similar to how it is done for IBSS interfaces. Previously, the mesh join was made implicit in case authentication (i.e. $key) was not used when creating the interface in mac80211_prepare_vif(), while using authentication would create the interface first, then join later in mac80211_setup_vif() by starting authsae. Signed-off-by: Nils Schneider Backport of r47408 --- .../kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 2852f3e..fb2f928 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -455,12 +455,7 @@ mac80211_prepare_vif() { } ;; mesh) - json_get_vars key mesh_id - if [ -n "$key" ]; then - iw phy "$phy" interface add "$ifname" type mp - else - iw phy "$phy" interface add "$ifname" type mp mesh_id "$mesh_id" - fi + iw phy "$phy" interface add "$ifname" type mp ;; monitor) iw phy "$phy" interface add "$ifname" type monitor @@ -606,6 +601,13 @@ mac80211_setup_vif() { wireless_vif_parse_encryption mac80211_setup_supplicant || failed=1 fi + else + json_get_vars mesh_id mcast_rate + + mcval= + [ -n "$mcast_rate" ] && wpa_supplicant_add_rate mcval "$mcast_rate" + + iw dev "$ifname" mesh join "$mesh_id" ${mcval:+mcast-rate $mcval} fi for var in $MP_CONFIG_INT $MP_CONFIG_BOOL $MP_CONFIG_STRING; do -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 29/32] ar71xx: add support for TP-LINK TL-WR941ND v6 (international version)
The international version is completely different from the already supported Chinese version. The WLAN of the QCA956x SoC used by this router has been fixed in r46948. This patch looks like it changes a lot in 700-MIPS-ath79-openwrt-machines.patch; that is not the case. Unfortunately, quilt decided to completely reorganize the Kconfig patch even though only a single section has been added. Signed-off-by: Matthias Schiffer Backport of r47420 --- target/linux/ar71xx/base-files/etc/diag.sh | 3 +- .../ar71xx/base-files/etc/uci-defaults/01_leds | 9 ++ .../ar71xx/base-files/etc/uci-defaults/02_network | 1 + target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../lib/preinit/05_set_preinit_iface_ar71xx| 1 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-3.18| 1 + .../files/arch/mips/ath79/mach-tl-wr941nd-v6.c | 149 + target/linux/ar71xx/image/Makefile | 9 +- .../610-MIPS-ath79-openwrt-machines.patch | 17 ++- 10 files changed, 189 insertions(+), 5 deletions(-) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr941nd-v6.c diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 89fe53c..3e80c32 100644 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -279,7 +279,8 @@ get_status_led() { tl-wdr4300 | \ tl-wr703n | \ tl-wr710n | \ - tl-wr720n-v3) + tl-wr720n-v3 | \ + tl-wr941nd-v6) status_led="tp-link:blue:system" ;; tl-wr841n-v9) diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 5241db2..11b3fa0 100644 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -460,6 +460,15 @@ tl-wr941nd-v5) ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" ;; +tl-wr941nd-v6) + ucidef_set_led_netdev "wan" "WAN" "tp-link:blue:wan" "eth0" + ucidef_set_led_switch "lan1" "LAN1" "tp-link:blue:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "tp-link:blue:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "tp-link:blue:lan3" "switch0" "0x04" + ucidef_set_led_switch "lan4" "LAN4" "tp-link:blue:lan4" "switch0" "0x02" + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:blue:wlan" "phy0tpt" + ;; + tl-wa830re-v2) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt" diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 8143d2d..5a74461 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -226,6 +226,7 @@ tl-mr3420-v2 |\ tl-wr841n-v8 |\ tl-wr842n-v2 |\ tl-wr941nd-v5 |\ +tl-wr941nd-v6 |\ wnr2000-v3 |\ wnr2000-v4 |\ wnr2200 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index f1f5561..d0abf42 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -800,6 +800,9 @@ ar71xx_board_detect() { *"TL-WR941N/ND v5") name="tl-wr941nd-v5" ;; + *"TL-WR941N/ND v6") + name="tl-wr941nd-v6" + ;; *"TL-WR703N v1") name="tl-wr703n" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx index f11ea8c..fd337e1 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_preinit_iface_ar71xx @@ -35,6 +35,7 @@ set_preinit_iface() { tl-wr720n-v3 |\ tl-wr841n-v8 |\ tl-wr842n-v2 |\ + tl-wr941nd-v6 |\ wnr2000-v3 |\ wnr2200 |\ wnr612-v2 |\ diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 8dea48f..2fc1d10 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -354,6 +354,7 @@ platform_check_image() { tl-wr842n-v2 | \ tl-wr941nd | \ tl-wr941nd-v5 | \ + tl-wr941nd-v6 | \ tl-wr1041n-v2 | \ tl-wr1043nd | \ tl-wr1043nd-v2 | \ diff --git a/target/linux/ar71xx/config-3.18 b/target/linux/ar71xx/config-3.18 index e9b3c7c..84b5844 100644 --- a/target/linux/ar71xx/config-3.18 +++ b/target/linux/ar71xx/config-3.18 @@ -132,6 +132,7 @@ CONFIG_ATH79_MAC
[OpenWrt-Devel] [PATCH CC 25/32] ar71xx: compex wpj531 fix setting mac address on ethernet
Signed-off-by: Christian Mehlis Backport of r46282 --- target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c index b106917..2cc2fe8 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wpj531.c @@ -94,9 +94,8 @@ static struct gpio_keys_button wpj531_gpio_keys[] __initdata = { static void __init common_setup(void) { - u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00); - u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000); - u8 tmpmac[ETH_ALEN]; + u8 *art = (u8 *) KSEG1ADDR(0x1fff); + u8 *mac = (u8 *) KSEG1ADDR(0x1f02e000); ath79_register_m25p80(NULL); @@ -109,7 +108,7 @@ static void __init common_setup(void) ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; ath79_eth0_data.speed = SPEED_100; ath79_eth0_data.phy_mask = BIT(4); - ath79_init_mac(ath79_eth0_data.mac_addr, mac, 0); + ath79_init_mac(ath79_eth0_data.mac_addr, mac + WPJ531_MAC0_OFFSET, 0); ath79_register_eth(0); /* WAN */ @@ -118,10 +117,10 @@ static void __init common_setup(void) ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; ath79_eth1_data.speed = SPEED_1000; ath79_switch_data.phy_poll_mask |= BIT(4); - ath79_init_mac(ath79_eth1_data.mac_addr, mac, 1); + ath79_init_mac(ath79_eth1_data.mac_addr, mac + WPJ531_MAC1_OFFSET, 0); ath79_register_eth(1); - ath79_register_wmac(ee, tmpmac); + ath79_register_wmac(art + WPJ531_WMAC_CALDATA_OFFSET, NULL); ath79_register_pci(); } -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 32/32] kernel: add Realtek USB to Ethernet modules
https://forum.openwrt.org/viewtopic.php?pid=279394 Signed-off-by: Dirk Neukirchen Backport of r46031 --- package/kernel/linux/modules/usb.mk | 30 ++ 1 file changed, 30 insertions(+) diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk index d1ff455..8f6013c 100644 --- a/package/kernel/linux/modules/usb.mk +++ b/package/kernel/linux/modules/usb.mk @@ -1267,6 +1267,36 @@ endef $(eval $(call KernelPackage,usb-net-qmi-wwan)) +define KernelPackage/usb-net-rtl8150 + TITLE:=Kernel module for USB-to-Ethernet Realtek convertors + KCONFIG:=CONFIG_USB_RTL8150 + FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/rtl8150.ko + AUTOLOAD:=$(call AutoProbe,rtl8150) + $(call AddDepends/usb-net) +endef + +define KernelPackage/usb-net-rtl8150/description + Kernel module for USB-to-Ethernet Realtek 8150 convertors +endef + +$(eval $(call KernelPackage,usb-net-rtl8150)) + + +define KernelPackage/usb-net-rtl8152 + TITLE:=Kernel module for USB-to-Ethernet Realtek convertors + KCONFIG:=CONFIG_USB_RTL8152 + FILES:=$(LINUX_DIR)/drivers/$(USBNET_DIR)/r8152.ko + AUTOLOAD:=$(call AutoProbe,r8152) + $(call AddDepends/usb-net) +endef + +define KernelPackage/usb-net-rtl8152/description + Kernel module for USB-to-Ethernet Realtek 8152 USB2.0/3.0 convertors +endef + +$(eval $(call KernelPackage,usb-net-rtl8152)) + + define KernelPackage/usb-net-rndis TITLE:=Support for RNDIS connections KCONFIG:=CONFIG_USB_NET_RNDIS_HOST -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 31/32] base-files: add /etc/profile.d support
OpenWrt should support an optional /etc/profile.d directory like most other Linux distributions. This allows packages to install their own scripts into /etc/profile.d/ directory. The file suffix should make clear, that these scripts are (sourced) shell-snippets. If the user needs e.g. php or lua, one must make sure that the interpreter is called. The reverse failsafe test makes sure, that the effective returncode is 0. A typcal usecase is the inclusion of private helpers, special variables or aliases, which at the moment needs patching the sourcecode and is not well maintainable. Now the builder can simply add there files. v1 initial work of Hendrik Lüth v2 changes regarding RFC (e.g. thomas.lan...@lantiq.com) v3 changes regarding RFC (e.g. mschif...@universe-factory.net) v4 keep it simple and mimic OpenWrt style Signed-off-by: Bastian Bittorf Backport of r46965 --- package/base-files/files/etc/profile | 7 +++ 1 file changed, 7 insertions(+) diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index 170f487..bd008a8 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -14,3 +14,10 @@ export PS1='\u@\h:\w\$ ' [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } + +[ -n "$FAILSAFE" ] || { + for FILE in /etc/profile.d/*.sh; do + [ -e "$FILE" ] && . "$FILE" + done + unset FILE +} -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 19/32] brcm2708-gpu-fw: move pkg build dir to kernel build dir to fix rebuild bugs after cleaning the kernel tree
Signed-off-by: Felix Fietkau Backport of r48732 --- package/kernel/brcm2708-gpu-fw/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/kernel/brcm2708-gpu-fw/Makefile b/package/kernel/brcm2708-gpu-fw/Makefile index eee85e0..286984b 100644 --- a/package/kernel/brcm2708-gpu-fw/Makefile +++ b/package/kernel/brcm2708-gpu-fw/Makefile @@ -16,7 +16,7 @@ PKG_SOURCE:=$(PKG_REV).tar.gz PKG_SOURCE_URL:=https://github.com/Hexxeh/rpi-firmware/archive/ PKG_MD5SUM:=f5683c1dcb255714942f7c9fd61b3a0a -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV) +PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)/rpi-firmware-$(PKG_REV) include $(INCLUDE_DIR)/package.mk -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 15/32] firmware-utils: mkfwimage: add -Wall, fix obvious bugs causing compile warnings
Signed-off-by: Matthias Schiffer Backport of r48827 --- tools/firmware-utils/Makefile| 2 +- tools/firmware-utils/src/mkfwimage.c | 12 +--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index bd69cb4..6d88845 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -32,7 +32,7 @@ define Host/Compile $(call cc,mkzynfw) $(call cc,lzma2eva,-lz) $(call cc,mkcasfw) - $(call cc,mkfwimage,-lz) + $(call cc,mkfwimage,-lz -Wall) $(call cc,mkfwimage2,-lz) $(call cc,imagetag imagetag_cmdline cyg_crc32) $(call cc,add_header) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index e3a03c1..00bf439 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -104,8 +104,6 @@ typedef struct part_data { #define OPTIONS "B:hv:m:o:r:k:" -static int debug = 0; - typedef struct image_info { char magic[16]; char version[256]; @@ -236,9 +234,9 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c fw_layout_t* p; p = &fw_layout_data[0]; - while ((strlen(p->name) != 0) && (strncmp(p->name, board_name, sizeof(board_name)) != 0)) + while (*p->name && (strcmp(p->name, board_name) != 0)) p++; - if (p->name == NULL) { + if (!*p->name) { printf("BUG! Unable to find default fw layout!\n"); exit(-1); } @@ -247,7 +245,7 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c strcpy(kernel->partition_name, "kernel"); kernel->partition_index = 1; kernel->partition_baseaddr = p->kern_start; - if ( (kernel->partition_length = filelength(kernelfile)) < 0) return (-1); + if ( (kernel->partition_length = filelength(kernelfile)) == (u_int32_t)-1) return (-1); kernel->partition_memaddr = p->kern_entry; kernel->partition_entryaddr = p->kern_entry; strncpy(kernel->filename, kernelfile, sizeof(kernel->filename)); @@ -263,8 +261,8 @@ static int create_image_layout(const char* kernelfile, const char* rootfsfile, c rootfs->partition_entryaddr = 0x; strncpy(rootfs->filename, rootfsfile, sizeof(rootfs->filename)); -printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr); -printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr); + printf("kernel: %d 0x%08x\n", kernel->partition_length, kernel->partition_baseaddr); + printf("root: %d 0x%08x\n", rootfs->partition_length, rootfs->partition_baseaddr); im->part_count = 2; return 0; -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 17/32] firmware-utils: mkfwimage: fix firmware_max_length for XM layout
The new u-boot version bundled with the 5.6.x firmwares from Ubiquiti gets confused by the smaller rootfs partition size; this can lead to various issues: 1. We've gotten reports that flashing from the 5.6.x stock firmware to OpenWrt will brick devices; I wasn't able to reproduce this myself 2. Flashing from 5.5.x stock firmware to OpenWrt and back to stock (via TFTP recovery), following by an update to 5.6.x via web interface can yield a bricked device with the following properties: - It can't be booted without entering commands over a serial console, as u-boot supplies the wrong MTD layout - The web interface won't accept any image with the original flash layout, so stock firmware upgrades are impossible - As the TFTP recovery doesn't update u-boot, returning to the old u-boot from firmware 5.5.x is impossible To recover from 2., creating an OpenWrt image which doesn't set u-boot as read-only and flashing a backup of the old u-boot from there is the only way known to me. (Fixing the mtdparts variable in u-boot-env from OpenWrt might also work; settings this from u-boot over serial didn't have any permanent effect.) Fix all of this by setting the correct flash layout also used by the stock firmware. Flashing has been tested from both firmware 5.5.x and 5.6.x. The fixed layout also matches the mtdparts defined by OpenWrt. Signed-off-by: Matthias Schiffer Backport of r48829 --- tools/firmware-utils/src/mkfwimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 5dae284..d8d5239 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -79,7 +79,7 @@ fw_layout_t fw_layout_data[] = { .name = "XM", .kern_start = 0x9f05, .kern_entry = 0x80002000, - .firmware_max_length= 0x006A, + .firmware_max_length= 0x0076, }, { .name = "UBDEV01", -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 16/32] ar71xx, firmware-utils: split ubdev01 flash layout from XM
The ubdev01 profile defines its own MTDPARTS with smaller firmware partition, so give it its own UBNT_BOARD in mkfwimage. Signed-off-by: Matthias Schiffer Backport of r48828 --- target/linux/ar71xx/image/Makefile | 2 +- tools/firmware-utils/src/mkfwimage.c | 6 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile index d28d6b3..05ef1d2 100644 --- a/target/linux/ar71xx/image/Makefile +++ b/target/linux/ar71xx/image/Makefile @@ -2031,7 +2031,7 @@ $(eval $(call SingleProfile,TPLINK-SAFELOADER,64kraw,CPE510,cpe210-220-510-520,C $(eval $(call SingleProfile,UAPPRO,64k,UAPPRO,ubnt-uap-pro,UAP-PRO,ttyS0,115200,BZ,BZ,ar934x)) $(eval $(call SingleProfile,UAPPRO,64k,UBNTUNIFIOUTDOORPLUS,ubnt-unifi-outdoor-plus,UBNT-UOP,ttyS0,115200,BZ,BZ,ar7240)) -$(eval $(call SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,XM,XM,ar7240)) +$(eval $(call SingleProfile,UBDEV,64kraw,UBDEV01,ubdev01,UBNT-UF,ttyS0,115200,UBDEV01,XM,ar7240)) $(eval $(call SingleProfile,UBNT,64k,UBNTRS,ubnt-rs,UBNT-RS,ttyS0,115200,RS,RSx,ar7100)) $(eval $(call SingleProfile,UBNT,64k,UBNTRSPRO,ubnt-rspro,UBNT-RSPRO,ttyS0,115200,RSPRO,RSPRO,ar7100pro)) diff --git a/tools/firmware-utils/src/mkfwimage.c b/tools/firmware-utils/src/mkfwimage.c index 00bf439..5dae284 100644 --- a/tools/firmware-utils/src/mkfwimage.c +++ b/tools/firmware-utils/src/mkfwimage.c @@ -81,6 +81,12 @@ fw_layout_t fw_layout_data[] = { .kern_entry = 0x80002000, .firmware_max_length= 0x006A, }, + { + .name = "UBDEV01", + .kern_start = 0x9f05, + .kern_entry = 0x80002000, + .firmware_max_length= 0x006A, + }, { .name = "", }, }; -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH CC 30/32] x86/generic: enable pata_atiixp driver
This enables booting from devices that use an ATI PATA controller for the boot device, such as the embedded CF cards in Fujitsu-Siemens Futro thin-clients. Signed-off-by: Felix Kaechele Backport of r47304 --- target/linux/x86/generic/config-default | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/x86/generic/config-default b/target/linux/x86/generic/config-default index eb4b357..9e963bf 100644 --- a/target/linux/x86/generic/config-default +++ b/target/linux/x86/generic/config-default @@ -153,6 +153,7 @@ CONFIG_NLS=y CONFIG_NO_HZ=y # CONFIG_PANASONIC_LAPTOP is not set CONFIG_PATA_AMD=y +CONFIG_PATA_ATIIXP=y CONFIG_PATA_LEGACY=y CONFIG_PATA_MPIIX=y CONFIG_PATA_OLDPIIX=y -- 2.7.2 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [RFC 0/4] Add support for Raspberry Pi 3
Haha, that was quick ;) On 29/02/2016 21:08, Álvaro Fernández Rojas wrote: > This adds untested support for Raspberry Pi 3. > I will be able to test it when I get my RPi 3 ;D. > > In the meantime if anyone already has a RPi 3 and wants to test it here's the > image: > http://files.noltari.es/openwrt/rpi3/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img > http://files.noltari.es/openwrt/rpi3/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz > > Álvaro Fernández Rojas (4): > include: add Cortex-A53 CPU_TYPE > brcm2708-gpu-fw: update to latest version > brcm2708: update linux 4.4 patches to latest version > brcm2708: add Raspberry Pi 3 support > > include/target.mk | 1 + > package/kernel/brcm2708-gpu-fw/Makefile| 8 +- > target/linux/brcm2708/Makefile | 8 +- > target/linux/brcm2708/bcm2708/config-4.4 | 4 +- > target/linux/brcm2708/bcm2709/config-4.4 | 4 +- > target/linux/brcm2708/bcm2710/config-4.4 | 390 > .../brcm2708/bcm2710/profiles/RaspberryPi3.mk | 14 + > target/linux/brcm2708/bcm2710/target.mk| 12 + > target/linux/brcm2708/image/Makefile | 12 +- > target/linux/brcm2708/modules.mk | 19 + > ...0001-smsx95xx-fix-crimes-against-truesize.patch | 4 +- > ...02-smsc95xx-Disable-turbo-mode-by-default.patch | 4 +- > ...around-for-issue-where-dirty-page-count-g.patch | 4 +- > .../0004-BCM2835_DT-Fix-I2S-register-map.patch | 4 +- > ...-Prevent-spurious-interrupts-and-trap-the.patch | 4 +- > .../0006-irqchip-bcm2835-Add-FIQ-support.patch | 4 +- > ...-irqchip-irq-bcm2835-Add-2836-FIQ-support.patch | 4 +- > ...erial-8250-Don-t-crash-when-nr_uarts-is-0.patch | 4 +- > ...2835-Set-base-to-0-give-expected-gpio-num.patch | 4 +- > ...2835-Fix-interrupt-handling-for-GPIOs-28-.patch | 4 +- > ...2835-Only-request-the-interrupts-listed-i.patch | 4 +- > ...cm2835-Support-pin-groups-other-than-7-11.patch | 4 +- > ...RM-bcm2835-Set-Serial-number-and-Revision.patch | 4 +- > ...-get-base-address-for-DMA-from-devicetree.patch | 4 +- > ...-add-24bit-support-update-bclk_ratio-to-m.patch | 4 +- > ...s-setup-clock-only-if-CPU-is-clock-master.patch | 4 +- > ...835-i2s-Eliminate-debugfs-directory-error.patch | 4 +- > .../0018-bcm2835-i2s-Register-PCM-device.patch | 4 +- > ...i2s-Enable-MMAP-support-via-a-DT-property.patch | 4 +- > ...0-dmaengine-bcm2835-Add-slave-dma-support.patch | 4 +- > ...ine-bcm2835-set-residue_granularity-field.patch | 4 +- > ...cm2835-Load-driver-early-and-support-lega.patch | 4 +- > ...-dma-Fix-dreq-not-set-for-slave-transfers.patch | 4 +- > ...-Limit-cyclic-transfers-on-lite-channels-.patch | 4 +- > .../0025-bcm2835-Add-support-for-uart1.patch | 4 +- > ...irmware-bcm2835-Add-missing-property-tags.patch | 4 +- > .../0027-Main-bcm2708-bcm2709-linux-port.patch | 4 +- > ...-squash-include-ARCH_BCM2708-ARCH_BCM2709.patch | 4 +- > .../patches-4.4/0029-Add-dwc_otg-driver.patch | 4 +- > .../0030-bcm2708-framebuffer-driver.patch | 4 +- > .../0031-dmaengine-Add-support-for-BCM2708.patch | 4 +- > ...-parameter-to-mmc-multi_io_quirk-callback.patch | 4 +- > .../0033-MMC-added-alternative-MMC-driver.patch| 4 +- > ...835-sdhost-driver-and-an-overlay-to-enabl.patch | 4 +- > ...ma-Add-vc_cma-driver-to-enable-use-of-CMA.patch | 4 +- > .../0036-bcm2708-alsa-sound-driver.patch | 4 +- > .../patches-4.4/0037-bcm2708-vchiq-driver.patch| 4 +- > .../0038-vc_mem-Add-vc_mem-driver.patch| 4 +- > ...deoCore-shared-memory-service-for-BCM2835.patch | 4 +- > ...omem-device-for-rootless-user-GPIO-access.patch | 4 +- > .../brcm2708/patches-4.4/0041-Add-SMI-driver.patch | 4 +- > .../patches-4.4/0042-Add-SMI-NAND-driver.patch | 4 +- > ...3-lirc-added-support-for-RaspberryPi-GPIO.patch | 4 +- > .../patches-4.4/0044-Add-cpufreq-driver.patch | 4 +- > ...-thermal-driver-for-reporting-core-temper.patch | 4 +- > .../0046-Add-Chris-Boot-s-i2c-driver.patch | 4 +- > .../0047-char-broadcom-Add-vcio-module.patch | 4 +- > ...048-firmware-bcm2835-Support-ARCH_BCM270x.patch | 4 +- > .../0049-bcm2835-add-v4l2-camera-device.patch | 4 +- > ...-mkknlimg-and-knlinfo-scripts-from-tools-.patch | 4 +- > ...port-for-the-CONFIG_CMDLINE_EXTEND-option.patch | 4 +- > ...0052-BCM2708-Add-core-Device-Tree-support.patch | 4 +- > ...3-bcm2835-Match-with-BCM2708-Device-Trees.patch | 4 +- > .../0054-fbdev-add-FBIOCOPYAREA-ioctl.patch| 4 +- > ...up-console-framebuffer-imageblit-function.patch | 4 +- > ...9-Allow-mac-address-to-be-set-in-smsc95xx.patch | 4 +- > ...e-realtime-clock-1-wire-chip-DS1307-and-1.patch | 4 +- > ...061-Added-Device-IDs-for-August-DVB-T-205.patch | 4 +- > ...le-CONFIG_MEMCG-but-leave-it-disabled-due
Re: [OpenWrt-Devel] [RFC 0/4] Add support for Raspberry Pi 3
On Feb 29, 2016 12:08 PM, "Álvaro Fernández Rojas" wrote: > > This adds untested support for Raspberry Pi 3. > I will be able to test it when I get my RPi 3 ;D. Will give it a shot tomorrow morning, thanks for quickly sending the patches out. > > In the meantime if anyone already has a RPi 3 and wants to test it here's the image: > http://files.noltari.es/openwrt/rpi3/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img > http://files.noltari.es/openwrt/rpi3/openwrt-brcm2708-bcm2710-rpi-3-ext4-sdcard.img.gz > > Álvaro Fernández Rojas (4): > include: add Cortex-A53 CPU_TYPE > brcm2708-gpu-fw: update to latest version > brcm2708: update linux 4.4 patches to latest version > brcm2708: add Raspberry Pi 3 support > > include/target.mk | 1 + > package/kernel/brcm2708-gpu-fw/Makefile| 8 +- > target/linux/brcm2708/Makefile | 8 +- > target/linux/brcm2708/bcm2708/config-4.4 | 4 +- > target/linux/brcm2708/bcm2709/config-4.4 | 4 +- > target/linux/brcm2708/bcm2710/config-4.4 | 390 > .../brcm2708/bcm2710/profiles/RaspberryPi3.mk | 14 + > target/linux/brcm2708/bcm2710/target.mk| 12 + > target/linux/brcm2708/image/Makefile | 12 +- > target/linux/brcm2708/modules.mk | 19 + > ...0001-smsx95xx-fix-crimes-against-truesize.patch | 4 +- > ...02-smsc95xx-Disable-turbo-mode-by-default.patch | 4 +- > ...around-for-issue-where-dirty-page-count-g.patch | 4 +- > .../0004-BCM2835_DT-Fix-I2S-register-map.patch | 4 +- > ...-Prevent-spurious-interrupts-and-trap-the.patch | 4 +- > .../0006-irqchip-bcm2835-Add-FIQ-support.patch | 4 +- > ...-irqchip-irq-bcm2835-Add-2836-FIQ-support.patch | 4 +- > ...erial-8250-Don-t-crash-when-nr_uarts-is-0.patch | 4 +- > ...2835-Set-base-to-0-give-expected-gpio-num.patch | 4 +- > ...2835-Fix-interrupt-handling-for-GPIOs-28-.patch | 4 +- > ...2835-Only-request-the-interrupts-listed-i.patch | 4 +- > ...cm2835-Support-pin-groups-other-than-7-11.patch | 4 +- > ...RM-bcm2835-Set-Serial-number-and-Revision.patch | 4 +- > ...-get-base-address-for-DMA-from-devicetree.patch | 4 +- > ...-add-24bit-support-update-bclk_ratio-to-m.patch | 4 +- > ...s-setup-clock-only-if-CPU-is-clock-master.patch | 4 +- > ...835-i2s-Eliminate-debugfs-directory-error.patch | 4 +- > .../0018-bcm2835-i2s-Register-PCM-device.patch | 4 +- > ...i2s-Enable-MMAP-support-via-a-DT-property.patch | 4 +- > ...0-dmaengine-bcm2835-Add-slave-dma-support.patch | 4 +- > ...ine-bcm2835-set-residue_granularity-field.patch | 4 +- > ...cm2835-Load-driver-early-and-support-lega.patch | 4 +- > ...-dma-Fix-dreq-not-set-for-slave-transfers.patch | 4 +- > ...-Limit-cyclic-transfers-on-lite-channels-.patch | 4 +- > .../0025-bcm2835-Add-support-for-uart1.patch | 4 +- > ...irmware-bcm2835-Add-missing-property-tags.patch | 4 +- > .../0027-Main-bcm2708-bcm2709-linux-port.patch | 4 +- > ...-squash-include-ARCH_BCM2708-ARCH_BCM2709.patch | 4 +- > .../patches-4.4/0029-Add-dwc_otg-driver.patch | 4 +- > .../0030-bcm2708-framebuffer-driver.patch | 4 +- > .../0031-dmaengine-Add-support-for-BCM2708.patch | 4 +- > ...-parameter-to-mmc-multi_io_quirk-callback.patch | 4 +- > .../0033-MMC-added-alternative-MMC-driver.patch| 4 +- > ...835-sdhost-driver-and-an-overlay-to-enabl.patch | 4 +- > ...ma-Add-vc_cma-driver-to-enable-use-of-CMA.patch | 4 +- > .../0036-bcm2708-alsa-sound-driver.patch | 4 +- > .../patches-4.4/0037-bcm2708-vchiq-driver.patch| 4 +- > .../0038-vc_mem-Add-vc_mem-driver.patch| 4 +- > ...deoCore-shared-memory-service-for-BCM2835.patch | 4 +- > ...omem-device-for-rootless-user-GPIO-access.patch | 4 +- > .../brcm2708/patches-4.4/0041-Add-SMI-driver.patch | 4 +- > .../patches-4.4/0042-Add-SMI-NAND-driver.patch | 4 +- > ...3-lirc-added-support-for-RaspberryPi-GPIO.patch | 4 +- > .../patches-4.4/0044-Add-cpufreq-driver.patch | 4 +- > ...-thermal-driver-for-reporting-core-temper.patch | 4 +- > .../0046-Add-Chris-Boot-s-i2c-driver.patch | 4 +- > .../0047-char-broadcom-Add-vcio-module.patch | 4 +- > ...048-firmware-bcm2835-Support-ARCH_BCM270x.patch | 4 +- > .../0049-bcm2835-add-v4l2-camera-device.patch | 4 +- > ...-mkknlimg-and-knlinfo-scripts-from-tools-.patch | 4 +- > ...port-for-the-CONFIG_CMDLINE_EXTEND-option.patch | 4 +- > ...0052-BCM2708-Add-core-Device-Tree-support.patch | 4 +- > ...3-bcm2835-Match-with-BCM2708-Device-Trees.patch | 4 +- > .../0054-fbdev-add-FBIOCOPYAREA-ioctl.patch| 4 +- > ...up-console-framebuffer-imageblit-function.patch | 4 +- > ...9-Allow-mac-address-to-be-set-in-smsc95xx.patch | 4 +- > ...e-realtime-clock-1-wire-chip-DS1307-and-1.patch | 4 +- > ...061-Added-Device-IDs-for-August-DVB-T-205