Re: [OpenWrt-Devel] Subject: [PATCH 1/1] blobmsg_json: allow to add full json files
Hi, Is there any documentation on the testing infrastructure being used, and what kind of unit test are expected. I couldn't find any guide on the wiki, and I'm more familiarized with the Node JS based workflows, and if there is some guide it will be faster than going thru the code. If you point me in the right direction I can add the corresponding tests. Adrián -Original Message- From: Petr Štetiar Sent: miércoles, 3 de junio de 2020 05:03 a. m. To: Adrian Panella Cc: openwrt-devel@lists.openwrt.org Subject: Re: [OpenWrt-Devel] Subject: [PATCH 1/1] blobmsg_json: allow to add full json files Hi, next time please do: $ git format-patch -s1 --subject-prefix "PATCH libubox" ... as described in https://openwrt.org/submitting-patches Adrian Panella [2020-02-22 20:11:28]: > Current function "blobmsg_add_json_from_file" only adds json file if > it is an object, and it only returns the properties, not a full object > attribute. > This version allows to read any valid json file and returns the > complete corresponding attribute. ... > } > whitespace issue > +bool blobmsg_add_json_file(struct blob_buf *b, const char *name, > +const char *file) { > + struct json_object *obj; > + bool ret; > + whitespace issue Apart from this whitespace nitpicks which I could fix by myself as well, I would like to ask you for adding test case under tests directory for this new function, so we can later assure on CI, that there are no memleaks or other issues in this code and spot any regression later as well. Please note, that test cases are not mandatory, but it is going to help merge your valuable contribution faster :-) Thanks! -- ynezz ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Subject: [PATCH 1/1] blobmsg_json: allow to add full json files
Current function "blobmsg_add_json_from_file" only adds json file if it is an object, and it only returns the properties, not a full object attribute. This version allows to read any valid json file and returns the complete corresponding attribute. Signed-off-by: Adrian Panella --- blobmsg_json.c | 16 blobmsg_json.h | 1 + 2 files changed, 17 insertions(+) diff --git a/blobmsg_json.c b/blobmsg_json.c index dce81e9..b8f91f1 100644 --- a/blobmsg_json.c +++ b/blobmsg_json.c @@ -87,6 +87,22 @@ bool blobmsg_add_json_element(struct blob_buf *b, const char *name, json_object return ret; } +bool blobmsg_add_json_file(struct blob_buf *b, const char *name, const char *file) +{ + struct json_object *obj; + bool ret; + + obj = json_object_from_file(file); + + if (!obj) + return false; + + ret = blobmsg_add_json_element(b, name, obj); + + json_object_put(obj); + return ret; +} + static bool __blobmsg_add_json(struct blob_buf *b, json_object *obj) { bool ret = false; diff --git a/blobmsg_json.h b/blobmsg_json.h index 9dfc02d..61cdbe5 100644 --- a/blobmsg_json.h +++ b/blobmsg_json.h @@ -23,6 +23,7 @@ struct json_object; bool blobmsg_add_object(struct blob_buf *b, struct json_object *obj); bool blobmsg_add_json_element(struct blob_buf *b, const char *name, struct json_object *obj); +bool blobmsg_add_json_file(struct blob_buf *b, const char *name, const char *file); bool blobmsg_add_json_from_string(struct blob_buf *b, const char *str); bool blobmsg_add_json_from_file(struct blob_buf *b, const char *file); -- 2.20.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Introducing the LEDE project
I'm a new comer to this community, and first experiencing with the use of OpenWrt both as firmware and developing it, so I don't feel much entitled to have a word here. But I find it is a great product and want to contribute to the project, so I'll share my perspective as someone who would like to join the boat. So far in my (very limited) experience porting OpenWrt to a new device I see some of the proposed changes very promising. I don't know if the best way is a rebranding or a v2, but in either case for me so far the two main aspects would be: + the possibility of doing pull requests, and if there is more active response to them (even if it is a rejection); much more like it seems to be in the feeds/packages area. + another aspect that would help a lot new comers like myself is better documentation. The current Wiki/Doc is incomplete and has a lot of mixture of information from old features which have been superseded or are outdated. Core services (like procd) are very briefly outlined. You really have to invest a lot of time to go thru the code base to understand the underlying picture. For documentation I find a platform more like Wikipedia, where changes can be tracked and discussions can take place, a great option. Thanks for the great work you've done so far! Regards, Adrián -Original Message- From: openwrt-devel [mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf Of Rick Pannen Sent: miércoles, 04 de mayo de 2016 04:01 a.m. To: Roman Yeryomin; Roman Yeryomin Cc: Bruno Randolf; OpenWrt Development List; Bruno Randolf; OpenWrt Development List Subject: Re: [OpenWrt-Devel] Introducing the LEDE project The only thing that seems to improve from my perspective is normal git pull requests instead of antiquated email patches. The name change and that 90's style website will only confuse the users. > Am 04.05.2016 um 00:50 schrieb Roman Yeryomin: > >> On 3 May 2016 at 23:19, Bruno Randolf wrote: >>> On 03/05/16 18:59, Jo-Philipp Wich wrote: >>> we'd like to introduce LEDE, a reboot of the OpenWrt community ... >>> Jo-Philipp Wich, >>> John Crispin, >>> Daniel Golle, >>> Felix Fietkau, >>> Hauke Mehrtens >>> John Crispin >>> Matthias Schiffer, >>> Steven Barth >> >> While a fresh start and a more open process is good move, given this >> list of supporters it sounds a bit ridiculous... who is left in the >> OpenWRT boat and why not do it as OpenWRT (V2 or whatever)??? > > Indeed. Looks like silent rebranding. Without public discussion of the > issues (and possible ways to fix them) in mailing list Same people, > rules and methods. > Could you elaborate more and explain how exactly LEDE is going to fix > the listed problems? And why it's not possible to fix them inside > existing project? > > > Regards, > Roman > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ipq806x: enable hard float
Sorry, resubmitting again fixing format problem. commit e40d7bf480243f855ad38e7752b96ba1e744ea1c Author: Adrian Panella <ianch...@outlook.com> Date: Tue Apr 5 21:45:14 2016 -0500 IPQ806X: enable hard float Signed-off-by: Adrian Panella <ianch...@outlook.com> diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 97a40cf..689ba64 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs nand ubifs +FEATURES:=squashfs nand ubifs fpu CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin <blo...@openwrt.org> ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] ipq806x: enable hard float
resubmitting fixing format problem commit e40d7bf480243f855ad38e7752b96ba1e744ea1c Author: Adrian Panella <ianch...@outlook.com> Date: Tue Apr 5 21:45:14 2016 -0500 IPQ806X: enable hard float Signed-off-by: Adrian Panella <ianch...@outlook.com> diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 97a40cf..689ba64 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs nand ubifs +FEATURES:=squashfs nand ubifs fpu CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin <blo...@openwrt.org> ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] [ipq806x] enable hard float
Author: Adrian Panella <ianch...@outlook.com> Date: Tue Apr 5 21:45:14 2016 -0500 IPQ806X: enable hard float tested with Linksys EA8500 Signed-off-by: Adrian Panella <ianch...@outlook.com> diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile index 97a40cf..689ba64 100644 --- a/target/linux/ipq806x/Makefile +++ b/target/linux/ipq806x/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk ARCH:=arm BOARD:=ipq806x BOARDNAME:=Qualcomm Atheros IPQ806X -FEATURES:=squashfs nand ubifs +FEATURES:=squashfs nand ubifs fpu CPU_TYPE:=cortex-a9 CPU_SUBTYPE:=neon-vfpv4 MAINTAINER:=John Crispin <blo...@openwrt.org> ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/8] [ipq806x] Add basic support for Linksys EA8500
g EEPROM country->regdmn map search [ 16.035644] ath: country maps to regdmn code: 0x3a [ 16.035651] ath: Country alpha2 being used: US [ 16.035657] ath: Regpair used: 0x3a [ 16.039332] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142) [ 16.040106] ath10k_pci 0001:01:00.0: pci irq msi interrupts 1 irq_mode 0 reset_mode 0 [ 16.175838] ath10k_pci 0001:01:00.0: qca99x0 hw2.0 target 0x0100 chip_id 0x003b01ff sub 168c:0002 [ 16.175874] ath10k_pci 0001:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs 1 testmode 1 [ 16.185739] ath10k_pci 0001:01:00.0: firmware ver 10.4.1.00030-1 api 5 features no-p2p crc32 d2901e01 [ 18.232442] ath10k_pci 0001:01:00.0: unable to read from the device [ 18.232468] ath10k_pci 0001:01:00.0: could not execute otp for board id check: -110 [ 18.237510] ath10k_pci 0001:01:00.0: failed to get board id from otp: -110 [ 18.237510] , ignored [ 18.245347] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0040,subsystem-vendor=168c,subsystem-device=0002 from ath10k/QCA99X0/hw2.0/board-2.bin [ 18.254712] ath10k_pci 0001:01:00.0: board_file api 1 bmi_id N/A crc32 7e56fd07 [ 19.653687] ath10k_pci 0001:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1 [ 19.716178] ath: EEPROM regdomain: 0x0 [ 19.716186] ath: EEPROM indicates default country code should be used [ 19.716193] ath: doing EEPROM country->regdmn map search [ 19.716202] ath: country maps to regdmn code: 0x3a [ 19.716209] ath: Country alpha2 being used: US [ 19.716215] ath: Regpair used: 0x3a [ 19.724461] u32 classifier [ 19.724481] input device check on [ 19.726054] Actions configured [ 19.730701] Mirror/redirect action on [ 19.736119] nf_conntrack version 0.5.0 (7523 buckets, 30092 max) [ 19.739611] ip_tables: (C) 2000-2006 Netfilter Core Team [ 19.824663] usbcore: registered new interface driver ums-alauda [ 19.825346] usbcore: registered new interface driver ums-cypress [ 19.830068] usbcore: registered new interface driver ums-datafab [ 19.836357] usbcore: registered new interface driver ums-freecom [ 19.842383] usbcore: registered new interface driver ums-isd200 [ 19.848303] usbcore: registered new interface driver ums-jumpshot [ 19.853992] usbcore: registered new interface driver ums-karma [ 19.860325] usbcore: registered new interface driver ums-sddr09 [ 19.866016] usbcore: registered new interface driver ums-sddr55 [ 19.871818] usbcore: registered new interface driver ums-usbat [ 19.889070] xt_time: kernel timezone is - [ 19.893315] PPP generic driver version 2.4.2 [ 19.894029] NET: Registered protocol family 24 [ 22.945241] eth0: device MAC address 00:06:3b:01:41:00 [ 22.960202] device eth0.1 entered promiscuous mode [ 22.960226] device eth0 entered promiscuous mode [ 22.967086] br-lan: port 1(eth0.1) entered forwarding state [ 22.968679] br-lan: port 1(eth0.1) entered forwarding state [ 24.942486] ipq806x-gmac-dwmac 3720.ethernet eth0: Link is Up - 1Gbps/Full - flow control off [ 24.962260] br-lan: port 1(eth0.1) entered forwarding state On 03/04/16 06:05, Imre Kaloz wrote: Hi Adrian, On Sat, 02 Apr 2016 01:48:22 +0200, Adrian Panella <ianch...@outlook.com> wrote: Hi Imre, networking seems to be working for me. So far I have done only basic testing. Can access the router from lan and wlan. No permormance test done, though. If you have a repo you can share with your patchset, I could gladly compare to take advantage of both works. I'll have time for this today, but the weird part is that comparing the dts I made and the one you submitted I see no difference when it comes to ethernet configuration. Could you post your dmesg and the contents of the devinfo partition? Thanks, Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 0/8] [ipq806x] Add basic support for Linksys EA8500
Hi Imre, networking seems to be working for me. So far I have done only basic testing. Can access the router from lan and wlan. No permormance test done, though. If you have a repo you can share with your patchset, I could gladly compare to take advantage of both works. Krgds Adrian From: Imre Kaloz <ka...@openwrt.org> Hi Adrian, On Fri, 01 Apr 2016 02:35:20 +0200, Adrian Panella outlook.com> wrote: > From: Adrian Panella > > > > This patchset adds support for the Linksys AC2600 EA8500 router. Does networking work for you? I have a patchset for the ea8500 I didn't push because of that. Thanks, Imre ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [PATCH 4/8] caldata-utils: new package to manipulate ath10k
So far I find it essential to make ath10k work on EA8500 with the right mac address (and perhaps on other routers using QCA99x0), and so a prerequisite for that profile. That was why I proposed it in the core packages. More or less like the uboot-env utilities, which are also a prerequisite for this profile. Or perhaps like the "oseama" or "rbcfg" packages in other platforms. Most of the functionality could be covered easily with a script and was my first attempt, but I couldn't find a way to code in a sh script the checksum calculation function to be able to patch the calibration data; and so ended writing it as a C helper utility. Basically the essential part is the small checksum function in utils.c. If you help me with some ideas, I can try to refactor it into a script. -Original Message- From: Pushpal Sidhu [mailto:psi...@gateworks.com] Sent: viernes, 01 de abril de 2016 12:57 p.m. To: Adrian Panella Cc: OpenWrt Development List; John Crispin Subject: Re: [OpenWrt-Devel] [PATCH 4/8] caldata-utils: new package to manipulate ath10k Hi, On Thu, Mar 31, 2016 at 6:48 PM, Adrian Panella <ianch...@outlook.com> wrote: > > > From df9a676bb3ba225f0fd6621dbaeec945baf3153d Mon Sep 17 00:00:00 2001 > From: Adrian Panella <ianch...@outlook.com> > Date: Wed, 30 Mar 2016 23:31:06 -0600 > Subject: [PATCH 12/15] caldata-utils: new package to manipulate ath10k > calibration data > > Signed-off-by: Adrian Panella <ianch...@outlook.com> > --- > package/utils/caldata-utils/Makefile | 60 + > package/utils/caldata-utils/src/Makefile | 8 ++ > package/utils/caldata-utils/src/caldata.c | 213 > ++ package/utils/caldata-utils/src/caldata.h | > 42 ++ > package/utils/caldata-utils/src/utils.c | 72 ++ > 5 files changed, 395 insertions(+) > create mode 100644 package/utils/caldata-utils/Makefile > create mode 100644 package/utils/caldata-utils/src/Makefile > create mode 100644 package/utils/caldata-utils/src/caldata.c > create mode 100644 package/utils/caldata-utils/src/caldata.h > create mode 100644 package/utils/caldata-utils/src/utils.c > > diff --git a/package/utils/caldata-utils/Makefile > b/package/utils/caldata-utils/Makefile > new file mode 100644 > index 000..eff7761 > --- /dev/null > +++ b/package/utils/caldata-utils/Makefile > @@ -0,0 +1,60 @@ > +# > +# Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2016 Adrian > +Panella # # This is free software, licensed under the GNU General > +Public License v2. > +# See /LICENSE for more information. > +# > + > +include $(TOPDIR)/rules.mk > + > +PKG_NAME:=caldata-utils > +PKG_RELEASE:=1 > + > +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) > +PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone > +USE_MUSL:argp-standalone > + > +include $(INCLUDE_DIR)/package.mk > + > +ifdef CONFIG_USE_UCLIBC > +LIBARGP="-largp" > +endif > + > +ifdef CONFIG_USE_MUSL > +LIBARGP="-largp" > +endif > + > + > +define Package/caldata-utils > + SECTION:=utils > + CATEGORY:=Utilities > + TITLE:=Utility to manipulate calibration data for ath10k > + MAINTAINER:=Adrian Panella <ianch...@outlook.com> endef > + > +define Package/caldata-utils/description This package contains an > +utility to manipulate calibration data for ath10k drivers. > + It enables to extract from MTD partition or file and to patch MAC address > fixing the checksum. > +endef > + > +define Build/Prepare > +mkdir -p $(PKG_BUILD_DIR) > +$(CP) ./src/* $(PKG_BUILD_DIR)/ > +endef > + > +define Build/Configure > +endef > + > +define Build/Compile > +$(MAKE) -C $(PKG_BUILD_DIR) \ > +CC="$(TARGET_CC)" \ > +CFLAGS="$(TARGET_CFLAGS) -Wall" \ > +LDFLAGS="$(TARGET_LDFLAGS) $(LIBARGP)" > +endef > + > +define Package/caldata-utils/install > +$(INSTALL_DIR) $(1)/usr/sbin > +$(INSTALL_BIN) $(PKG_BUILD_DIR)/caldata $(1)/usr/sbin/ endef > + > +$(eval $(call BuildPackage,caldata-utils)) > diff --git a/package/utils/caldata-utils/src/Makefile > b/package/utils/caldata-utils/src/Makefile > new file mode 100644 > index 000..57ab936 > --- /dev/null > +++ b/package/utils/caldata-utils/src/Makefile > @@ -0,0 +1,8 @@ > + > +all: caldata > + > +caldata: caldata.c utils.c > +$(CC) $(CFLAGS) -o $@ caldata.c utils.c $(LDFLAGS) > + > +clean: > +rm caldata > diff --git a/package/utils/caldata-utils/src/caldata.c > b/package/utils/caldata-utils/src/caldata.c > new file mode 100644 > index 000..d5391d5 > --- /dev/null > +++ b/package/utils/caldata-utils/src/caldata.c > @@ -0,0 +1
[OpenWrt-Devel] [PATCH 8/8] base-files: add basic support for Linksys EA8500
From 48ad89dfe88645993a1e5cf553b141c9c3d01414 Mon Sep 17 00:00:00 2001 From: Adrian Panella <ianch...@outlook.com> Date: Thu, 17 Mar 2016 22:08:42 -0600 Subject: [PATCH 06/15] base-files: add basic support for Linksys EA8500 --- .../linux/ipq806x/base-files/etc/board.d/01_leds | 2 + .../ipq806x/base-files/etc/board.d/02_network | 8 ++ .../ipq806x/base-files/etc/init.d/linksys_recovery | 20 + target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 + .../ipq806x/base-files/lib/upgrade/linksys.sh | 88 ++ .../ipq806x/base-files/lib/upgrade/platform.sh | 19 - .../ipq806x/base-files/lib/preinit/04_caldata | 32 6 files changed, 170 insertions(+), 2 deletions(-) create mode 100755 target/linux/ipq806x/base-files/etc/init.d/linksys_recovery create mode 100644 target/linux/ipq806x/base-files/lib/upgrade/linksys.sh create mode 100644 target/linux/ipq806x/base-files/lib/preinit/04_caldata diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index b32c1cc..f57453e 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -20,6 +20,8 @@ r7500) ucidef_set_led_default "wps" "WPS" "r7500:white:wps" "0" ucidef_set_led_default "rfkill" "rfkill" "r7500:white:rfkill" "0" ;; +ea8500) +ucidef_set_led_default "wps" "WPS" "ea8500:green:wps" "0" *) ;; esac diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 55d78cd..8465919 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -6,6 +6,7 @@ . /lib/functions/uci-defaults.sh . /lib/ipq806x.sh +. /lib/functions/system.sh board_config_update @@ -24,8 +25,15 @@ db149) "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" ;; ea8500) + +hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr) + ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0t@eth0" "5:wan" "0t@eth0" + +ucidef_set_interface_macaddr "lan" "$hw_mac_addr" +ucidef_set_interface_macaddr "wan" "$hw_mac_addr" + ;; *) echo "Unsupported hardware. Network interfaces not intialized" diff --git a/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery b/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery new file mode 100755 index 000..b9ea004 --- /dev/null +++ b/target/linux/ipq806x/base-files/etc/init.d/linksys_recovery @@ -0,0 +1,20 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2015 OpenWrt.org + +START=97 +boot() { +. /lib/functions.sh +. /lib/ipq806x.sh + +case $(ipq806x_board_name) in +ea8500) +# make sure auto_recovery in uboot is always on +AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`" +if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then +fw_setenv auto_recovery yes +fi +# reset the boot counter +mtd resetbc s_env +;; +esac +} diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh index db22708..fcc5a43 100644 --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh @@ -26,6 +26,9 @@ ipq806x_board_detect() { *"R7500") name="r7500" ;; +*"Linksys EA8500"*) +name="ea8500" +;; esac [ -z "$name" ] && name="unknown" diff --git a/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh b/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh new file mode 100644 index 000..ca5161a --- /dev/null +++ b/target/linux/ipq806x/base-files/lib/upgrade/linksys.sh @@ -0,0 +1,88 @@ +# +# Copyright (C) 2014-2015 OpenWrt.org +# + +linksys_get_target_firmware() { +cur_boot_part=`/usr/sbin/fw_printenv -n boot_part` +target_firmware="" +if [ "$cur_boot_part" = "1" ] +then +# current primary boot - update alt boot +target_firmware="kernel2" +fw_setenv boot_part 2 +#In EA8500 bootcmd is always "bootipq", so don't change +#fw_setenv bootcmd "run altnandboot" +elif [ "$cur_boot_part" = "2" ] +then +# current alt boot - update primary boot +target_firmware="kernel1" +fw_setenv boot_part 1 +#In EA8500 bootcmd is always "bootipq&q
[OpenWrt-Devel] [PATCH 7/8] Firmware Image: add configuration for EA8500
From: Adrian Panella <ianch...@outlook.com> Date: Thu, 17 Mar 2016 22:05:17 -0600 Subject: [PATCH 7/8] Firmware Image: add configuration for EA8500 Image creation for EA8500. Two factory images are created for flashing usign the web interface of the respective Linksys firmware versions: ...factory_168206.bin ...factory_169978.bin Higher US Firmware versions aren't supported as they are signed. Signed-off-by: Adrian Panella <ianch...@outlook.com> --- target/linux/ipq806x/image/Makefile | 22 +- target/linux/ipq806x/image/ea8500_168206.tag | Bin 0 -> 255 bytes target/linux/ipq806x/image/ea8500_169978.tag | Bin 0 -> 256 bytes 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 target/linux/ipq806x/image/ea8500v1.tag create mode 100755 target/linux/ipq806x/image/ea8500v2.tag diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index ff8b2c7..ac27a92 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -133,6 +133,26 @@ define Device/R7500 BOARD_NAME := r7500 endef -TARGET_DEVICES += AP148 AP148-legacy D7800 DB149 R7500 +define Device/EA8500 +$(call Device/LegacyImage) +DEVICE_DTS := qcom-ipq8064-ea8500 +PAGESIZE := 2048 +BLOCKSIZE := 128KiB +KERNEL_SIZE := 3145728 +FILESYSTEMS := squashfs +KERNEL = kernel-bin | append-dtb | uImage none | append-file $(KDIR)/root.dummy +PROFILES := Generic EA8500 +BOARD_NAME := ea8500 +IMAGES := factory_168206.bin factory_169978.bin sysupgrade.tar +IMAGE/factory_168206.bin := append-kernel 3145728 | append-ubi | append-file ea8500_168206.tag +IMAGE/factory_169978.bin := append-kernel 3145728 | append-ubi | append-file ea8500_169978.tag +IMAGE/sysupgrade.tar := sysupgrade-nand +DEVICE_VARS += DEVICE_DTS KERNEL_SIZE PAGESIZE BLOCKSIZE SUBPAGESIZE +endef + +TARGET_DEVICES += AP148 AP148-legacy D7800 DB149 R7500 EA8500 +ifeq ($(PROFILE),EA8500) + TARGET_DEVICES = EA8500 +endif $(eval $(call BuildImage)) diff --git a/target/linux/ipq806x/image/ea8500v1.tag b/target/linux/ipq806x/image/ea8500_168206.tag new file mode 100755 index ..aa8c9f4b09d5127c620b48fac8bc1078e73ee27c GIT binary patch literal 255 zcmdP%@$~Z!jttf_Ff=eQFflN9b+j-wFi?O2XA4J1Q)6cnn20w}6$rQ)7&diff --git a/target/linux/ipq806x/image/ea8500v2.tag b/target/linux/ipq806x/image/ea8500_169978.tag new file mode 100755 index ..90febaae7e89907aa3b99dd2ec872c166b903203 GIT binary patch literal 256 zcmdP%@$~Z!jttf_Ff=eQFflN9b+j-wFi?O2GgCuX6DLCxn20w}6$rQ)7&<$fT39d) GaR2~9*bKq| literal 0 HcmV?d1 -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 6/8] DTS: Add EA8500 device tree
From: Adrian Panella <ianch...@outlook.com> Date: Thu, 17 Mar 2016 22:03:41 -0600 Subject: [PATCH 6/8] DTS: Add EA8500 device tree --- .../arch/arm/boot/dts/qcom-ipq8064-ea8500.dts | 368 + .../802-ARM-qcom-add-Linksys-EA8500-dts.patch | 11 + 2 files changed, 379 insertions(+) create mode 100644 target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts create mode 100644 target/linux/ipq806x/patches-3.18/802-ARM-qcom-add-Linksys-EA8500-dts.patch diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts new file mode 100644 index 000..bb4632a --- /dev/null +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts @@ -0,0 +1,368 @@ +#include "qcom-ipq8064-v1.0.dtsi" + +#include + +/ { +model = "Linksys EA8500 WiFi Router"; +compatible = "linksys,ea8500", "qcom,ipq8064"; + +memory@0 { +reg = <0x4200 0x1e00>; +device_type = "memory"; +}; + +reserved-memory { +#address-cells = <1>; +#size-cells = <1>; +ranges; +rsvd@4120 { +reg = <0x4120 0x30>; +no-map; +}; +}; + +aliases { +serial0 = +mdio-gpio0 = +}; + +chosen { +bootargs = "console=ttyMSM0,115200n8"; +linux,stdout-path = "serial0:115200n8"; +}; + +soc { +pinmux@80 { +i2c4_pins: i2c4_pinmux { +pins = "gpio12", "gpio13"; +function = "gsbi4"; +bias-disable; +}; + +nand_pins: nand_pins { +mux { +pins = "gpio34", "gpio35", "gpio36", + "gpio37", "gpio38", "gpio39", + "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; +function = "nand"; +drive-strength = <10>; +bias-disable; +}; +pullups { +pins = "gpio39"; +bias-pull-up; +}; +hold { +pins = "gpio40", "gpio41", "gpio42", + "gpio43", "gpio44", "gpio45", + "gpio46", "gpio47"; +bias-bus-hold; +}; +}; + +mdio0_pins: mdio0_pins { +mux { +pins = "gpio0", "gpio1"; +function = "gpio"; +drive-strength = <8>; +bias-disable; +}; +}; + +rgmii2_pins: rgmii2_pins { +mux { +pins = "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", + "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62" ; +function = "rgmii2"; +drive-strength = <8>; +bias-disable; +}; +}; + +}; + +gsbi@1630 { +qcom,mode = ; +status = "ok"; +serial@1634 { +status = "ok"; +}; +/* + * The i2c device on gsbi4 should not be enabled. + * On ipq806x designs gsbi4 i2c is meant for exclusive + * RPM usage. Turning this on in kernel manifests as + * i2c failure for the RPM. + */ +}; + +sata-phy@1b40 { +status = "ok"; +}; + +sata@2900 { +status = "ok"; +}; + +phy@100f8800 {/* USB3 port 1 HS phy */ +status = "ok"; +}; + +phy@100f8830 {/* USB3 port 1 SS phy */ +status = "ok"; +}; + +phy@110f8800 {/* USB3 port 0 HS phy */ +status = "ok"; +}; + +phy@110f8830 {/* USB3 port 0 SS phy */ +status = "ok"; +}; + +usb30@0 { +status = "ok"; +}; + +usb30@1 { +status = "ok"; +}; + +pcie0: pci@1b50 { +
[OpenWrt-Devel] [PATCH 5/8] Profile: add Linksys EA8500
From e8f337cbc3dd9a9f4684810227d0d9946bb245f7 Mon Sep 17 00:00:00 2001 From: Adrian Panella <ianch...@outlook.com> Date: Thu, 17 Mar 2016 22:08:15 -0600 Subject: [PATCH 5/8] Profile: add Linksys EA8500 --- target/linux/ipq806x/profiles/linksys.mk | 22 ++ 1 file changed, 22 insertions(+) create mode 100644 target/linux/ipq806x/profiles/linksys.mk diff --git a/target/linux/ipq806x/profiles/linksys.mk b/target/linux/ipq806x/profiles/linksys.mk new file mode 100644 index 000..9b4fe6b --- /dev/null +++ b/target/linux/ipq806x/profiles/linksys.mk @@ -0,0 +1,22 @@ +# +# Copyright (c) 2014 The Linux Foundation. All rights reserved. +# Copyright (C) 2009 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +define Profile/EA8500 +NAME:=Linksys EA8500 Max-Stream AC2600 MU-MIMO +PACKAGES:= \ +kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev \ +kmod-usb3 kmod-usb-dwc3-qcom kmod-usb-phy-qcom-dwc3 \ +kmod-ath10k wpad-mini ath10k-firmware-qca99x0 \ +uboot-envtools caldata-utils +endef + +define Profile/EA8500/Description +Package set for the Linksys EA8500 Max-Stream AC2600 MU-MIMO. +endef + +$(eval $(call Profile,EA8500)) -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 4/8] caldata-utils: new package to manipulate ath10k
From df9a676bb3ba225f0fd6621dbaeec945baf3153d Mon Sep 17 00:00:00 2001 From: Adrian Panella <ianch...@outlook.com> Date: Wed, 30 Mar 2016 23:31:06 -0600 Subject: [PATCH 12/15] caldata-utils: new package to manipulate ath10k calibration data Signed-off-by: Adrian Panella <ianch...@outlook.com> --- package/utils/caldata-utils/Makefile | 60 + package/utils/caldata-utils/src/Makefile | 8 ++ package/utils/caldata-utils/src/caldata.c | 213 ++ package/utils/caldata-utils/src/caldata.h | 42 ++ package/utils/caldata-utils/src/utils.c | 72 ++ 5 files changed, 395 insertions(+) create mode 100644 package/utils/caldata-utils/Makefile create mode 100644 package/utils/caldata-utils/src/Makefile create mode 100644 package/utils/caldata-utils/src/caldata.c create mode 100644 package/utils/caldata-utils/src/caldata.h create mode 100644 package/utils/caldata-utils/src/utils.c diff --git a/package/utils/caldata-utils/Makefile b/package/utils/caldata-utils/Makefile new file mode 100644 index 000..eff7761 --- /dev/null +++ b/package/utils/caldata-utils/Makefile @@ -0,0 +1,60 @@ +# +# Copyright (C) 2006-2010 OpenWrt.org +# Copyright (C) 2016 Adrian Panella +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=caldata-utils +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) +PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone + +include $(INCLUDE_DIR)/package.mk + +ifdef CONFIG_USE_UCLIBC +LIBARGP="-largp" +endif + +ifdef CONFIG_USE_MUSL +LIBARGP="-largp" +endif + + +define Package/caldata-utils + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Utility to manipulate calibration data for ath10k + MAINTAINER:=Adrian Panella <ianch...@outlook.com> +endef + +define Package/caldata-utils/description + This package contains an utility to manipulate calibration data for ath10k drivers. + It enables to extract from MTD partition or file and to patch MAC address fixing the checksum. +endef + +define Build/Prepare +mkdir -p $(PKG_BUILD_DIR) +$(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Configure +endef + +define Build/Compile +$(MAKE) -C $(PKG_BUILD_DIR) \ +CC="$(TARGET_CC)" \ +CFLAGS="$(TARGET_CFLAGS) -Wall" \ +LDFLAGS="$(TARGET_LDFLAGS) $(LIBARGP)" +endef + +define Package/caldata-utils/install +$(INSTALL_DIR) $(1)/usr/sbin +$(INSTALL_BIN) $(PKG_BUILD_DIR)/caldata $(1)/usr/sbin/ +endef + +$(eval $(call BuildPackage,caldata-utils)) diff --git a/package/utils/caldata-utils/src/Makefile b/package/utils/caldata-utils/src/Makefile new file mode 100644 index 000..57ab936 --- /dev/null +++ b/package/utils/caldata-utils/src/Makefile @@ -0,0 +1,8 @@ + +all: caldata + +caldata: caldata.c utils.c +$(CC) $(CFLAGS) -o $@ caldata.c utils.c $(LDFLAGS) + +clean: +rm caldata diff --git a/package/utils/caldata-utils/src/caldata.c b/package/utils/caldata-utils/src/caldata.c new file mode 100644 index 000..d5391d5 --- /dev/null +++ b/package/utils/caldata-utils/src/caldata.c @@ -0,0 +1,213 @@ +/* + * + * Copyright (C) 2016 Adrian Panella <ianch...@outlook.com> + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * + * caldata + * + * Utility to manipulate calibration data for ath10k drivers. + * It enables to extract from MTD partition or file and to patch MAC address fixing the checksum. + * + */ + + +#include +#include +#include + +#include "caldata.h" + + +/* Parse a single option. */ +static error_t parse_opt (int key, char *arg, struct argp_state *state) +{ + struct arguments *arguments = state->input; + + switch (key) +{ +case 'i': + arguments->input_file = arg; + break; + +case 'f': + arguments->output_file = arg; + break; + +case 'o': + sscanf(arg,"%li", >offset); + break; + +case 's': + sscanf(arg,"%li", >size); + break; + +case 'a': + + if(!isMAC(arg)) +argp_error(state,"address is not a valid MAC address"); + + arguments->macaddr = arg;
[OpenWrt-Devel] [PATCH 3/8] ath10k: ignore otp check
From d637fc78e444c81392a3f59cd0d9a3b955960966 Mon Sep 17 00:00:00 2001 From: Adrian Panella <ianch...@outlook.com> Date: Mon, 28 Mar 2016 02:23:03 -0600 Subject: [PATCH 3/8] ath10k: ignore otp check Patchs otp check in ath10k --- .../mac80211/patches/940-ath10k_ignore_otp_check | 14 + 1 files changed, 14 insertions(+) create mode 100644 package/kernel/mac80211/patches/940-ath10k_ignore_otp_check diff --git a/package/kernel/mac80211/patches/940-ath10k_ignore_otp_check b/package/kernel/mac80211/patches/940-ath10k_ignore_otp_check new file mode 100644 index 000..40cf11a --- /dev/null +++ b/package/kernel/mac80211/patches/940-ath10k_ignore_otp_check @@ -0,0 +1,14 @@ +--- a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c +@@ -1800,9 +1800,8 @@ static int ath10k_core_probe_fw(struct a + + ret = ath10k_core_get_board_id_from_otp(ar); + if (ret && ret != -EOPNOTSUPP) { +-ath10k_err(ar, "failed to get board id from otp: %d\n", ++ath10k_err(ar, "failed to get board id from otp: %d, ignored\n", +ret); +-return ret; + } + + ret = ath10k_core_fetch_board_file(ar); -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 2/8] bootargs: Add mangled bootargs for ATAG to DTB
From: Adrian Panella <ianch...@outlook.com> Date: Thu, 17 Mar 2016 22:07:38 -0600 Subject: [PATCH 2/8] bootargs: Add mangled bootargs for ATAG to DTB Enables reading bootloader supplied bootargs and append them to the DTB as a new key (bootloader-args), so that they are known but won't break the automatisms OpenWrt uses. It appends to the kernel command line the mumber of the mtd partition that has to be set as root (this is needed for the dual boot mechanism) using the option mangled_rootblock=XX Needs the following options to be set in Kernel config CONFIG_ARM_ATAG_DTB_COMPAT=y CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND=y Signed-off-by: Adrian Panella <ianch...@outlook.com> --- .../patches-3.18/100-find_active_root.patch| 61 +++ .../patches-3.18/110-ATAG-mangled-bootargs.patch | 86 ++ target/linux/ipq806x/config-3.18| 5 - 3 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 target/linux/ipq806x/patches-3.18/100-find_active_root.patch create mode 100644 target/linux/ipq806x/patches-3.18/110-ATAG-mangled-bootargs.patch diff --git a/target/linux/ipq806x/patches-3.18/100-find_active_root.patch b/target/linux/ipq806x/patches-3.18/100-find_active_root.patch new file mode 100644 index 000..e32b608 --- /dev/null +++ b/target/linux/ipq806x/patches-3.18/100-find_active_root.patch @@ -0,0 +1,61 @@ +The WRT1900AC among other Linksys routers uses a dual-firmware layout. +Dynamically rename the active partition to "ubi". + +Signed-off-by: Imre Kaloz <ka...@openwrt.org> + +--- a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c +@@ -25,12 +25,15 @@ static bool node_has_compatible(struct d + return of_get_property(pp, "compatible", NULL); + } + ++static int mangled_rootblock; ++ + static int parse_ofpart_partitions(struct mtd_info *master, + struct mtd_partition **pparts, + struct mtd_part_parser_data *data) + { + struct device_node *node; + const char *partname; ++const char *owrtpart = "ubi"; + struct device_node *pp; + int nr_parts, i; + +@@ -78,9 +81,15 @@ static int parse_ofpart_partitions(struc + (*pparts)[i].offset = of_read_number(reg, a_cells); + (*pparts)[i].size = of_read_number(reg + a_cells, s_cells); + +- partname = of_get_property(pp, "label", ); +- if (!partname) +-partname = of_get_property(pp, "name", ); ++ if (mangled_rootblock && (i == mangled_rootblock)) { ++ partname = owrtpart; ++ } else { ++partname = of_get_property(pp, "label", ); ++ ++if (!partname) ++ partname = of_get_property(pp, "name", ); ++ } ++ + (*pparts)[i].name = partname; + + if (of_get_property(pp, "read-only", )) +@@ -178,6 +187,18 @@ static int __init ofpart_parser_init(voi + return 0; + } + ++static int __init active_root(char *str) ++{ ++get_option(, _rootblock); ++ ++if (!mangled_rootblock) ++ return 1; ++ ++return 1; ++} ++ ++__setup("mangled_rootblock=", active_root); ++ + static void __exit ofpart_parser_exit(void) + { + deregister_mtd_parser(_parser); diff --git a/target/linux/ipq806x/patches-3.18/110-ATAG-mangled-bootargs.patch b/target/linux/ipq806x/patches-3.18/110-ATAG-mangled-bootargs.patch new file mode 100644 index 000..34da86c --- /dev/null +++ b/target/linux/ipq806x/patches-3.18/110-ATAG-mangled-bootargs.patch @@ -0,0 +1,86 @@ +--- a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c +@@ -66,6 +66,55 @@ static uint32_t get_cell_size(const void + return cell_size; + } + ++#if defined(CONFIG_MANGLE_BOOTARGS) ++ ++static char *append_mangled_root(char *dest, char *str, int len) ++{ ++char *ptr, *end; ++char *root="root="; ++int i; ++ ++//ARM doesn't have __HAVE_ARCH_STRSTR, so search manually ++ptr=str-1; ++ ++do { ++ ptr++; ++ //first find an 'r' at the begining or after a space ++ do { ++ptr=strchr(ptr, 'r'); ++if(!ptr) return dest; ++ ++ } while (ptr!=str && *(ptr-1)!=' '); ++ ++ //then check for the rest ++ for(i=1; i<=4;i++) ++if(*(ptr+i)!=*(root+i)) break; ++ ++} while (i!=5); ++ ++ ++end=strchr(ptr, ' '); ++end= end ? (end-1) : (strchr(ptr, 0)-1); ++ ++ ++//find partition number (assumes format root=/dev/mtdXX | /dev/mtdblockXX | yy:XX) ++for(i=0;end >= ptr && *end >='0' && *end <='9' ; end--, i++); ++
[OpenWrt-Devel] [PATCH 1/8] uboot-envtools: add support for Linksys EA8500
From: Adrian Panella <ianch...@outlook.com> Date: Thu, 17 Mar 2016 22:00:03 -0600 Subject: [PATCH 1/8] uboot-envtools: add support for Linksys EA8500 --- package/boot/uboot-envtools/Makefile | 4 package/boot/uboot-envtools/files/ipq806x | 37 +++ package/system/mtd/src/Makefile | 1 + 3 files changed, 42 insertions(+) create mode 100644 package/boot/uboot-envtools/files/ipq806x diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index a5b0f92..d14cc40 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -109,6 +109,10 @@ ifneq ($(CONFIG_TARGET_ramips),) $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools endif +ifneq ($(CONFIG_TARGET_ipq806x),) + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_DATA) ./files/ipq806x $(1)/etc/uci-defaults/30_uboot-envtools +endif endef $(eval $(call BuildPackage,uboot-envtools)) diff --git a/package/boot/uboot-envtools/files/ipq806x b/package/boot/uboot-envtools/files/ipq806x new file mode 100644 index 000..a596abc --- /dev/null +++ b/package/boot/uboot-envtools/files/ipq806x @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (C) 2012-2014 OpenWrt.org +# + +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/ipq806x.sh +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(ipq806x_board_name) + + +case "$board" in +"ea8500") + ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x2" "0x2" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 diff --git a/package/system/mtd/src/Makefile b/package/system/mtd/src/Makefile index 94a2a1a..70c61e5 100644 --- a/package/system/mtd/src/Makefile +++ b/package/system/mtd/src/Makefile @@ -12,6 +12,7 @@ obj.brcm63xx = imagetag.o obj.ramips = $(obj.seama) obj.mvebu = linksys_bootcount.o obj.kirkwood = linksys_bootcount.o +obj.ipq806x = linksys_bootcount.o ifdef FIS_SUPPORT obj += fis.o -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/8] uboot-envtools: add support for Linksys EA8500
From: Adrian Panella <ianch...@outlook.com <mailto:ianch...@outlook.com> > Date: Thu, 17 Mar 2016 22:00:03 -0600 Subject: [PATCH 1/8] uboot-envtools: add support for Linksys EA8500 --- package/boot/uboot-envtools/Makefile | 4 package/boot/uboot-envtools/files/ipq806x | 37 +++ package/system/mtd/src/Makefile | 1 + 3 files changed, 42 insertions(+) create mode 100644 package/boot/uboot-envtools/files/ipq806x diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index a5b0f92..d14cc40 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -109,6 +109,10 @@ ifneq ($(CONFIG_TARGET_ramips),) $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools endif +ifneq ($(CONFIG_TARGET_ipq806x),) + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_DATA) ./files/ipq806x $(1)/etc/uci-defaults/30_uboot-envtools +endif endef $(eval $(call BuildPackage,uboot-envtools)) diff --git a/package/boot/uboot-envtools/files/ipq806x b/package/boot/uboot-envtools/files/ipq806x new file mode 100644 index 000..a596abc --- /dev/null +++ b/package/boot/uboot-envtools/files/ipq806x @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (C) 2012-2014 OpenWrt.org +# + +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/ipq806x.sh +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(ipq806x_board_name) + + +case "$board" in +"ea8500") + ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x2" "0x2" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 diff --git a/package/system/mtd/src/Makefile b/package/system/mtd/src/Makefile index 94a2a1a..70c61e5 100644 --- a/package/system/mtd/src/Makefile +++ b/package/system/mtd/src/Makefile @@ -12,6 +12,7 @@ obj.brcm63xx = imagetag.o obj.ramips = $(obj.seama) obj.mvebu = linksys_bootcount.o obj.kirkwood = linksys_bootcount.o +obj.ipq806x = linksys_bootcount.o ifdef FIS_SUPPORT obj += fis.o -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 1/8] uboot-envtools: add support for Linksys EA8500
From: Adrian Panella <ianch...@outlook.com> Date: Thu, 17 Mar 2016 22:00:03 -0600 Subject: [PATCH 1/8] uboot-envtools: add support for Linksys EA8500 --- package/boot/uboot-envtools/Makefile | 4 package/boot/uboot-envtools/files/ipq806x | 37 +++ package/system/mtd/src/Makefile | 1 + 3 files changed, 42 insertions(+) create mode 100644 package/boot/uboot-envtools/files/ipq806x diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index a5b0f92..d14cc40 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -109,6 +109,10 @@ ifneq ($(CONFIG_TARGET_ramips),) $(INSTALL_DIR) $(1)/etc/uci-defaults $(INSTALL_DATA) ./files/ramips $(1)/etc/uci-defaults/30_uboot-envtools endif +ifneq ($(CONFIG_TARGET_ipq806x),) + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_DATA) ./files/ipq806x $(1)/etc/uci-defaults/30_uboot-envtools +endif endef $(eval $(call BuildPackage,uboot-envtools)) diff --git a/package/boot/uboot-envtools/files/ipq806x b/package/boot/uboot-envtools/files/ipq806x new file mode 100644 index 000..a596abc --- /dev/null +++ b/package/boot/uboot-envtools/files/ipq806x @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (C) 2012-2014 OpenWrt.org +# + +[ -e /etc/config/ubootenv ] && exit 0 + +touch /etc/config/ubootenv + +. /lib/ipq806x.sh +. /lib/uboot-envtools.sh +. /lib/functions.sh + +board=$(ipq806x_board_name) + + +case "$board" in +"ea8500") + ubootenv_add_uci_config "/dev/mtd10" "0x0" "0x2" "0x2" + ;; +esac + +config_load ubootenv +config_foreach ubootenv_add_app_config ubootenv + +exit 0 diff --git a/package/system/mtd/src/Makefile b/package/system/mtd/src/Makefile index 94a2a1a..70c61e5 100644 --- a/package/system/mtd/src/Makefile +++ b/package/system/mtd/src/Makefile @@ -12,6 +12,7 @@ obj.brcm63xx = imagetag.o obj.ramips = $(obj.seama) obj.mvebu = linksys_bootcount.o obj.kirkwood = linksys_bootcount.o +obj.ipq806x = linksys_bootcount.o ifdef FIS_SUPPORT obj += fis.o -- 1.9.1 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH 0/8] [ipq806x] Add basic support for Linksys EA8500
From: Adrian Panella <ianch...@outlook.com> This patchset adds support for the Linksys AC2600 EA8500 router. Tested: * Flashing from original webui using the factory images (it generates one for original firmware 1.1.4.168206 an another for 1.1.4.169978, newer US Firmwares are not supported due to signing) * Sysupgrading from within OpenWrt. * wifi 2.4GHz and 5GHz. Untested: * Using the usb/esata port. [PATCHSET 0/8] [PATCH 1/8] uboot-envtools: add support for Linksys EA8500 [PATCH 2/8] bootargs: Add mangled bootargs for ATAG to DTB [PATCH 3/8] ath10k: ignore otp check [PATCH 4/8] caldata-utils: new package to manipulate ath10k [PATCH 5/8] Profile: add Linksys EA8500 [PATCH 6/8] DTS: Add EA8500 device tree [PATCH 7/8] Firmware Image: add configuration for EA8500 [PATCH 8/8] base-files: add basic support for Linksys EA8500 package/boot/uboot-envtools/Makefile | 4 + package/boot/uboot-envtools/files/ipq806x| 26 ++ package/kernel/mac80211/patches/940-ath10k_ignore_otp_check | 14 + package/system/mtd/src/Makefile | 1 + package/utils/caldata-utils/Makefile | 60 + package/utils/caldata-utils/src/Makefile | 8 + package/utils/caldata-utils/src/caldata.c| 213 package/utils/caldata-utils/src/caldata.h| 42 +++ package/utils/caldata-utils/src/utils.c | 72 ++ target/linux/ipq806x/base-files/etc/board.d/01_leds | 2 + target/linux/ipq806x/base-files/etc/board.d/02_network | 12 + target/linux/ipq806x/base-files/etc/init.d/linksys_recovery | 20 ++ target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 + target/linux/ipq806x/base-files/lib/preinit/04_caldata | 32 +++ target/linux/ipq806x/base-files/lib/upgrade/linksys.sh | 88 +++ target/linux/ipq806x/base-files/lib/upgrade/platform.sh | 19 +- target/linux/ipq806x/config-3.18 | 5 +- .../ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts | 368 +++ target/linux/ipq806x/image/Makefile | 22 +- target/linux/ipq806x/image/ea8500_168206.tag | Bin 0 -> 255 bytes target/linux/ipq806x/image/ea8500_169978.tag | Bin 0 -> 256 bytes target/linux/ipq806x/modules.mk | 3 + target/linux/ipq806x/patches-3.18/100-find_active_root.patch | 61 + .../ipq806x/patches-3.18/110-ATAG-mangled-bootargs.patch | 86 +++ .../patches-3.18/802-ARM-qcom-add-Linksys-EA8500-dts.patch | 11 + target/linux/ipq806x/profiles/linksys.mk | 22 ++ 26 files changed, 1190 insertions(+), 4 deletions(-) ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel