Re: [LEDE-DEV] TR-069 for OpenWrt
On 2016-05-27 01:43, Delbar Jos wrote: > Hi all, > > At Technicolor we have followed with great interest the recent > proposals to enhance OpenWrt with an open source solution for TR-069 > remote management. As one of the world's largest vendors of modems > and routers for carrier applications, making use of OpenWrt in a > significant share of our install base, we want to support this > initiative in a meaningful way. Concretely, we are willing to open > source Technicolor's in-house TR-069 solution and thereby contribute > to OpenWrt: > * a TR-069 protocol agent, > * a data model mapping framework that we use to bridge the world of >OpenWrt, UCI, UBUS ... with the world of TR-069, TR-098, TR-181 ... >(and by extension with the world of SNMP, MIB, NETCONF, YANG ...), > * a set of mappings. Nice! > We are conscious of the fact that together with the proposals made > by Felix, Luka and Wojtek we are now looking at many "competing" proposals. > As a next step, we recommend to organize a workshop, at a practical > location and time, where we put everything on the table and define the > most appropriate path forward to the benefit of OpenWrt as a whole. I think such a workshop would be a great idea. It would be nice to have the code available for review some time before that workshop, so we can all take a detailed look at the various proposals before we sit down and decide how to move forward with this. > TR-069 is a complicated remote management system and in order to make > this initiative a success, we must ensure that the complexity is > handled in an elegant way and with respect for OpenWrt's core > architecture. More than on the protocol itself, we believe that we > should focus on the architectural enhancements required to support > remote management in general. Sounds good! - Felix ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v2] util-linux: fix breakage
- install correct libs to staging/usr/lib fixes eudev, nfs-kernel-server the lib*.a seem broken - use the correct .so files and remove .a libs - some build breakage was observed with parallel builds: text-utils/more-more.o: In function `putstring': more.c:(.text+0x1f4): undefined reference to `tputs' text-utils/more-more.o: In function `initterm': more.c:(.text+0x1b74): undefined reference to `setupterm' more.c:(.text+0x1f0c): undefined reference to `tparm' more.c:(.text+0x20ac): undefined reference to `tigetnum' more.c:(.text+0x20c8): undefined reference to `tigetflag' more.c:(.text+0x20ec): undefined reference to `tigetstr' more.c:(.text+0x2148): undefined reference to `PC' text-utils/more-more.o: In function `reset_tty': more.c:(.text+0x2630): undefined reference to `tputs' - fix line length Signed-off-by: Dirk Neukirchen--- package/utils/util-linux/Makefile | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 9d4ca38..cfa244d 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -16,9 +16,16 @@ PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.28 PKG_MD5SUM:=e534e6ccc49107e5d31c329af798ef7d PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING getopt/COPYING libblkid/COPYING libmount/COPYING Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.LGPLv2.1 libuuid/COPYING Documentation/licenses/COPYING.BSD-3 +PKG_LICENSE_FILES:=COPYING \ + getopt/COPYING \ + libblkid/COPYING\ + libmount/COPYING\ + Documentation/licenses/COPYING.GPLv2\ + Documentation/licenses/COPYING.LGPLv2.1 \ + libuuid/COPYING \ + Documentation/licenses/COPYING.BSD-3 -PKG_BUILD_PARALLEL:=1 +PKG_BUILD_PARALLEL:=0 PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_cal \ @@ -457,37 +464,48 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.{a,so*} $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.{a,so*} $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.{a,so*} $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.{a,so*} $(1)/usr/lib - $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.{a,so*} $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib + + $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so + $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so + $(LN) libmount.so.1 $(1)/usr/lib/libmount.so + $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so + $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so endef define Package/libfdisk/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib/ + $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so endef define Package/libblkid/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib/ + $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so endef define Package/libmount/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib/ + $(LN) libmount.so.1 $(1)/usr/lib/libmount.so endef define Package/libsmartcols/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib/ + $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so endef define Package/libuuid/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib/ + $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so endef define Package/agetty/install -- 2.8.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH] util-linux: fix breakage
- install correct libs to staging/usr/lib fixes eudev, nfs-kernel-server the lib*.a seem broken - use the correct .so files and remove .a libs - some build breakage was observed with parallel builds: text-utils/more-more.o: In function `putstring': more.c:(.text+0x1f4): undefined reference to `tputs' text-utils/more-more.o: In function `initterm': more.c:(.text+0x1b74): undefined reference to `setupterm' more.c:(.text+0x1f0c): undefined reference to `tparm' more.c:(.text+0x20ac): undefined reference to `tigetnum' more.c:(.text+0x20c8): undefined reference to `tigetflag' more.c:(.text+0x20ec): undefined reference to `tigetstr' more.c:(.text+0x2148): undefined reference to `PC' text-utils/more-more.o: In function `reset_tty': more.c:(.text+0x2630): undefined reference to `tputs' - fix line length Signed-off-by: Dirk Neukirchen--- package/utils/util-linux/Makefile | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 4d6799d..cfa244d 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -16,9 +16,16 @@ PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.28 PKG_MD5SUM:=e534e6ccc49107e5d31c329af798ef7d PKG_LICENSE:=GPL-2.0 -PKG_LICENSE_FILES:=COPYING getopt/COPYING libblkid/COPYING libmount/COPYING Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.LGPLv2.1 libuuid/COPYING Documentation/licenses/COPYING.BSD-3 +PKG_LICENSE_FILES:=COPYING \ + getopt/COPYING \ + libblkid/COPYING\ + libmount/COPYING\ + Documentation/licenses/COPYING.GPLv2\ + Documentation/licenses/COPYING.LGPLv2.1 \ + libuuid/COPYING \ + Documentation/licenses/COPYING.BSD-3 -PKG_BUILD_PARALLEL:=1 +PKG_BUILD_PARALLEL:=0 PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_cal \ @@ -462,32 +469,43 @@ define Build/InstallDev $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib + + $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so + $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so + $(LN) libmount.so.1 $(1)/usr/lib/libmount.so + $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so + $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so endef define Package/libfdisk/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib/ + $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so endef define Package/libblkid/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib/ + $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so endef define Package/libmount/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib/ + $(LN) libmount.so.1 $(1)/usr/lib/libmount.so endef define Package/libsmartcols/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib/ + $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so endef define Package/libuuid/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib/ + $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so endef define Package/agetty/install -- 2.8.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH-v2 1/2] Add some common packages for x86-64 target.
From: Ben GreearThis should make x86-64 targets more useable out of the box. The assumption is that most x86-64 users have adequate storage, and those that do not can still config away the options they do not need. Signed-off-by: Ben Greear --- target/linux/x86/64/target.mk | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/linux/x86/64/target.mk b/target/linux/x86/64/target.mk index 6497698..95bd378 100644 --- a/target/linux/x86/64/target.mk +++ b/target/linux/x86/64/target.mk @@ -1,6 +1,14 @@ ARCH:=x86_64 BOARDNAME:=x86_64 -DEFAULT_PACKAGES += kmod-button-hotplug kmod-e1000e kmod-e1000 kmod-r8169 +DEFAULT_PACKAGES += kmod-button-hotplug kmod-e1000e kmod-e1000 kmod-r8169 kmod-8139cp kmod-8139too +DEFAULT_PACKAGES += kmod-i2c-core kmod-i2c-algo-bit kmod-igb +# Add some drivers for common wifi NICs +DEFAULT_PACKAGES += kmod-ath9k kmod-ath10k kmod-ath9k-htc kmod-ath5k +# Add some firmware +DEFAULT_PACKAGES += ath10k-firmware-qca988x ath10k-firmware-qca99x0 ath9k-htc-firmware ath10k-firmware-qca6174 +# Useful general OS packages +DEFAULT_PACKAGES += bzip2 curl dmesg ethtool getopt hostapd ip-full iperf3 iputils-ping iputils-tracepath iw +DEFAULT_PACKAGES += nstat relayd tcpdump wpa-cli wpa-supplicant wpa-supplicant-mesh define Target/Description Build images for 64 bit systems including virtualized guests. -- 2.4.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH-v2 2/2] Add script to build common platforms.
From: Ben GreearThe idea is to be able to allow newbies to easily build images for common hardware. These images should be user-friendly, including luci and other tools that may aid debugging and use of the platform. Includes example that builds x86-64 with additional drivers and luci so that it works nicely on apu2 and other generic hardware. Signed-off-by: Ben Greear --- buildme.sh| 76 +++ buildme_targets/x86_64/diffconfig.txt | 50 +++ 2 files changed, 126 insertions(+) create mode 100755 buildme.sh create mode 100644 buildme_targets/x86_64/diffconfig.txt diff --git a/buildme.sh b/buildme.sh new file mode 100755 index 000..83644fa --- /dev/null +++ b/buildme.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash + +USAGE=$( cat < /dev/null 2>&1 +echo "Images may be found at: bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/" diff --git a/buildme_targets/x86_64/diffconfig.txt b/buildme_targets/x86_64/diffconfig.txt new file mode 100644 index 000..923b35e --- /dev/null +++ b/buildme_targets/x86_64/diffconfig.txt @@ -0,0 +1,50 @@ +CONFIG_TARGET_x86=y +CONFIG_TARGET_x86_64=y +CONFIG_TARGET_x86_64_Generic=y +CONFIG_ALL_NONSHARED=y +CONFIG_BUSYBOX_CUSTOM=y +CONFIG_BUSYBOX_CONFIG_ARP=y +CONFIG_BUSYBOX_CONFIG_FEATURE_TELNET_AUTOLOGIN=y +CONFIG_BUSYBOX_CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_BUSYBOX_CONFIG_LSPCI=y +CONFIG_BUSYBOX_CONFIG_LSUSB=y +CONFIG_BUSYBOX_CONFIG_MORE=y +CONFIG_BUSYBOX_CONFIG_TELNET=y +CONFIG_ETHTOOL_PRETTY_DUMP=y +CONFIG_IMAGEOPT=y +CONFIG_PACKAGE_hostapd-common-old=y +CONFIG_PACKAGE_hostapd-utils=y +CONFIG_PACKAGE_kmod-hwmon-core=y +CONFIG_PACKAGE_iperf=y +CONFIG_PACKAGE_kmod-ath5k=m +CONFIG_PACKAGE_kmod-i2c-algo-bit=y +CONFIG_PACKAGE_kmod-i2c-core=y +CONFIG_PACKAGE_kmod-igb=y +CONFIG_PACKAGE_kmod-libphy=y +CONFIG_PACKAGE_kmod-skge=y +CONFIG_PACKAGE_kmod-sky2=y +CONFIG_PACKAGE_kmod-tg3=y +CONFIG_PACKAGE_libiwinfo=y +CONFIG_PACKAGE_libiwinfo-lua=y +CONFIG_PACKAGE_liblua=y +CONFIG_PACKAGE_libubus-lua=y +CONFIG_PACKAGE_libuci-lua=y +CONFIG_PACKAGE_lua=y +CONFIG_PACKAGE_luci=y +CONFIG_PACKAGE_luci-app-firewall=y +CONFIG_PACKAGE_luci-base=y +CONFIG_PACKAGE_luci-lib-ip=y +CONFIG_PACKAGE_luci-lib-jsonc=y +CONFIG_PACKAGE_luci-lib-nixio=y +CONFIG_PACKAGE_luci-mod-admin-full=y +CONFIG_PACKAGE_luci-proto-ipv6=y +CONFIG_PACKAGE_luci-proto-ppp=y +CONFIG_PACKAGE_luci-theme-bootstrap=y +CONFIG_PACKAGE_rpcd=y +CONFIG_PACKAGE_uclibcxx=y +CONFIG_PACKAGE_uhttpd=y +CONFIG_PACKAGE_uhttpd-mod-ubus=y +CONFIG_PACKAGE_zlib=y +# CONFIG_PER_FEED_REPO is not set +CONFIG_TARGET_KERNEL_PARTSIZE=64 +CONFIG_TARGET_ROOTFS_PARTSIZE=1024 -- 2.4.3 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 04/10] ipq806x/base-files: Add Archer C2600 LEDs and board
Signed-off-by: Ash Benz--- target/linux/ipq806x/base-files/etc/board.d/01_leds| 7 +++ target/linux/ipq806x/base-files/etc/board.d/02_network | 1 + 2 files changed, 8 insertions(+) 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..392dc8b 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -11,6 +11,13 @@ board_config_update board=$(ipq806x_board_name) case "$board" in +c2600) + ucidef_set_led_usbdev "usb1" "USB 1" "usb_2:blue" "2-1" + ucidef_set_led_usbdev "usb2" "USB 2" "usb_4:blue" "4-1" + ucidef_set_led_netdev "wan" "WAN" "wan:blue" "eth0" + ucidef_set_led_netdev "lan" "LAN" "lan:blue" "br-lan" + ucidef_set_led_default "general" "general" "ledgnr:blue" "1" + ;; d7800 |\ r7500) ucidef_set_led_usbdev "usb1" "USB 1" "r7500:white:usb1" "1-1" 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 6e18297..e3c9137 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -13,6 +13,7 @@ board=$(ipq806x_board_name) case "$board" in ap148 |\ +c2600 |\ d7800 |\ r7500) ucidef_add_switch "switch0" \ -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 10/10] kernel/mtd: Add support for Macronix mx25u25635f, used in C2600 v1.1
Signed-off-by: Ash Benz--- .../patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch diff --git a/target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch b/target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch new file mode 100644 index 000..c2aa418 --- /dev/null +++ b/target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch @@ -0,0 +1,10 @@ +--- a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +@@ -722,6 +722,7 @@ static const struct flash_info spi_nor_i + { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, + { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, + { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) }, ++ { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, 0) }, + { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, + { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) }, + { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 03/10] ipq806x: Add Archer C2600 to image/Makefile
Signed-off-by: Ash Benz--- target/linux/ipq806x/image/Makefile | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile index ff8b2c7..2756eb7 100644 --- a/target/linux/ipq806x/image/Makefile +++ b/target/linux/ipq806x/image/Makefile @@ -36,6 +36,11 @@ define Build/append-dtb cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@ endef +define Build/append-new-dtb + $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb) + cat $@.dtb >> $@ +endef + define Build/append-file cat $(1) >> $@ endef @@ -86,6 +91,19 @@ define Device/DniImage endef DEVICE_VARS += KERNEL_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID DEVICE_BLOCK_SIZE DEVICE_PAGE_SIZE +define Device/TpSafeImage + PROFILES += $$(DEVICE_NAME) + FILESYSTEMS := squashfs + KERNEL_SUFFIX := -uImage + KERNEL = kernel-bin | append-new-dtb | uImage none + KERNEL_NAME := zImage + TPLINK_BOARD_NAME := + IMAGES := factory.bin sysupgrade.bin + IMAGE/factory.bin := append-rootfs | tplink-safeloader factory + IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade +endef +DEVICE_VARS += TPLINK_BOARD_NAME + define Device/AP148 $(call Device/FitImage) $(call Device/UbiFit) @@ -104,6 +122,15 @@ define Device/AP148-legacy BOARD_NAME := ap148 endef +define Device/C2600 + $(call Device/TpSafeImage) + DEVICE_DTS := qcom-ipq8064-c2600 + BLOCKSIZE := 128KiB + PAGESIZE := 2048 + BOARD_NAME := c2600 + TPLINK_BOARD_NAME := C2600 +endef + define Device/D7800 $(call Device/DniImage) DEVICE_DTS := qcom-ipq8064-d7800 @@ -133,6 +160,6 @@ define Device/R7500 BOARD_NAME := r7500 endef -TARGET_DEVICES += AP148 AP148-legacy D7800 DB149 R7500 +TARGET_DEVICES += AP148 AP148-legacy C2600 D7800 DB149 R7500 $(eval $(call BuildImage)) -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 08/10] ipq806x/dts: Add Archer C2600 DTS
Signed-off-by: Ash Benz--- target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts | 412 1 file changed, 412 insertions(+) create mode 100644 target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts diff --git a/target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts new file mode 100644 index 000..fc13637 --- /dev/null +++ b/target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts @@ -0,0 +1,412 @@ +#include "qcom-ipq8064-v1.0.dtsi" +#include + +/ { + model = "TP-Link Archer C2600"; + compatible = "tplink,c2600", "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 { + linux,stdout-path = "serial0:115200n8"; + }; + + soc { + pinmux@80 { + i2c4_pins: i2c4_pinmux { + pins = "gpio12", "gpio13"; + function = "gsbi4"; + bias-disable; + }; + + spi_pins: spi_pins { + mux { + pins = "gpio18", "gpio19", "gpio21"; + function = "gsbi5"; + drive-strength = <10>; + bias-none; + }; + }; + + 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. +*/ + }; + + gsbi5: gsbi@1a20 { + qcom,mode = ; + status = "ok"; + + spi4: spi@1a28 { + status = "ok"; + spi-max-frequency = <5000>; + + pinctrl-0 = <_pins>; +
[LEDE-DEV] [PATCH v3 06/10] ipq806x/base-files: extract ath10k caldata
Signed-off-by: Ash Benz--- .../etc/hotplug.d/firmware/11-ath10k-caldata | 68 ++ 1 file changed, 68 insertions(+) create mode 100644 target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata new file mode 100644 index 000..5f604e1 --- /dev/null +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -0,0 +1,68 @@ +#!/bin/sh + +ath10kcal_die() { + echo "ath10cal: " "$*" + exit 1 +} + +ath10kcal_from_file() { + local source=$1 + local offset=$2 + local count=$3 + + dd if=$source of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + ath10kcal_die "failed to extract calibration data from $source" +} + +ath10kcal_extract() { + local part=$1 + local offset=$2 + local count=$3 + local mtd + + mtd=$(find_mtd_chardev $part) + [ -n "$mtd" ] || \ + ath10kcal_die "no mtd device found for partition $part" + + dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + ath10kcal_die "failed to extract calibration data from $mtd" +} + +ath10kcal_patch_mac() { + local mac=$1 + + [ -z "$mac" ] && return + + macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=6 count=6 +} + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/ipq806x.sh +. /lib/functions.sh +. /lib/functions/system.sh + +board=$(ipq806x_board_name) + + +case "$FIRMWARE" in +"ath10k/cal-pci-:01:00.0.bin") + case $board in + c2600) + ath10kcal_extract "radio" 4096 12064 +# ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 8) -1) + ;; + esac + ;; +"ath10k/cal-pci-0001:01:00.0.bin") + case $board in + c2600) + ath10kcal_extract "radio" 20480 12064 +# ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 8) -2) + ;; + esac + ;; +*) + exit 1 + ;; +esac -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 05/10] ipq806x/base-files: Add support for Archer C2600
Signed-off-by: Ash Benz--- target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 +++ .../linux/ipq806x/base-files/lib/upgrade/platform.sh | 20 +++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh index db22708..73202c0 100644 --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh @@ -17,6 +17,9 @@ ipq806x_board_detect() { *"AP148") name="ap148" ;; + *"C2600") + name="c2600" + ;; *"D7800") name="d7800" ;; diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 542b5ce..a181f13 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -12,6 +12,14 @@ platform_check_image() { nand_do_platform_check $board $1 return $?; ;; + c2600) + local magic_long="$(get_magic_long "$1")" + [ "$magic_long" != "27051956" ] && { + echo "Invalid image, bad magic: $magic_long" + return 1 + } + return 0; + ;; *) return 1; esac @@ -29,4 +37,14 @@ platform_pre_upgrade() { esac } -# use default for platform_do_upgrade() +platform_do_upgrade() { + local board=$(ipq806x_board_name) + + case "$board" in + c2600) + PART_NAME="os-image:rootfs" + MTD_CONFIG_ARGS="-s 0x20" + default_do_upgrade "$ARGV" + ;; + esac +} -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 09/10] kernel/mac80211: skip ath10k OTP check if caldata found
Signed-off-by: Ash Benz--- .../patches/936-ath10k_skip_otp_check.patch| 42 ++ 1 file changed, 42 insertions(+) create mode 100644 package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch diff --git a/package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch b/package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch new file mode 100644 index 000..39aba41 --- /dev/null +++ b/package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch @@ -0,0 +1,42 @@ +--- a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c +@@ -1165,9 +1165,6 @@ static int ath10k_core_fetch_firmware_fi + { + int ret; + +- /* calibration file is optional, don't check for any errors */ +- ath10k_fetch_cal_file(ar); +- + ar->fw_api = 5; + ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api); + +@@ -1870,6 +1867,9 @@ static int ath10k_core_probe_fw(struct a + goto err_power_down; + } + ++ /* calibration file is optional, don't check for any errors */ ++ int calret = ath10k_fetch_cal_file(ar); ++ + ret = ath10k_core_fetch_firmware_files(ar); + if (ret) { + ath10k_err(ar, "could not fetch firmware files (%d)\n", ret); +@@ -1892,11 +1892,14 @@ static int ath10k_core_probe_fw(struct a + "could not load pre cal data: %d\n", ret); + } + +- 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", +- ret); +- goto err_free_firmware_files; ++ /* otp and board file not needed if calibration data is present */ ++ if (calret) { ++ 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", ++ ret); ++ return ret; ++ } + } + + ret = ath10k_core_fetch_board_file(ar); -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 02/10] fw-utils/tplink-safeloader.c: Add support for Archer C2600
Signed-off-by: Ash Benz--- tools/firmware-utils/src/tplink-safeloader.c | 114 ++- 1 file changed, 111 insertions(+), 3 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 77a894b..2e204aa 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -105,6 +105,8 @@ static const uint8_t md5_salt[16] = { /** Vendor information for CPE210/220/510/520 */ static const char cpe510_vendor[] = "CPE510(TP-LINK|UN|N300-5):1.0\r\n"; +/** Vendor information for C2600 */ +static const char c2600_vendor[] = ""; /** The flash partition table for CPE210/220/510/520; @@ -128,6 +130,39 @@ static const struct flash_partition_entry cpe510_partitions[] = { }; /** +The flash partition table for C2600; +it is the same as the one used by the stock images. +*/ +static const struct flash_partition_entry c2600_partitions[] = { +{"SBL1", 0x0, 0x2}, +{"MIBIB", 0x2, 0x2}, +{"SBL2", 0x4, 0x2}, +{"SBL3", 0x6, 0x3}, +{"DDRCONFIG", 0x9, 0x1}, +{"SSD", 0xa, 0x1}, +{"TZ", 0xb, 0x3}, +{"RPM", 0xe, 0x2}, +{"fs-uboot", 0x10, 0x7}, +{"uboot-env", 0x17, 0x4}, +{"radio", 0x1b, 0x4}, +{"os-image", 0x1f, 0x20}, +{"file-system", 0x3f, 0x1b0}, +{"default-mac", 0x1ef, 0x00200}, +{"pin", 0x1ef0200, 0x00200}, +{"product-info", 0x1ef0400, 0x0fc00}, +{"partition-table", 0x1f0, 0x1}, +{"soft-version", 0x1f1, 0x1}, +{"support-list", 0x1f2, 0x1}, +{"profile", 0x1f3, 0x1}, +{"default-config", 0x1f4, 0x1}, +{"user-config", 0x1f5, 0x4}, +{"qos-db", 0x1f9, 0x4}, +{"usb-config", 0x1fd, 0x1}, +{"log", 0x1fe, 0x2}, + {NULL, 0, 0} +}; + +/** The support list for CPE210/220/510/520 */ static const char cpe510_support_list[] = @@ -141,6 +176,13 @@ static const char cpe510_support_list[] = "CPE220(TP-LINK|UN|N300-2):1.0\r\n" "CPE220(TP-LINK|UN|N300-2):1.1\r\n"; +/** + The support list for C2600 +*/ +static const char c2600_support_list[] = + "SupportList:\r\n" + "{product_name:Archer C2600,product_ver:1.0.0,special_id:}\r\n"; + #define error(_ret, _errno, _str, ...) \ do {\ fprintf(stderr, _str ": %s\n", ## __VA_ARGS__, \ @@ -240,14 +282,14 @@ 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 char *support_list) { +static struct image_partition_entry make_support_list(const char *support_list, bool trailzero) { 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'; + entry.data[len+8] = trailzero ? '\x00' : '\xff'; return entry; } @@ -436,6 +478,37 @@ static void * generate_sysupgrade_image(const struct flash_partition_entry *flas return image; } +static void * generate_sysupgrade_image_c2600(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 = _parts[11]; + const struct flash_partition_entry *flash_file_system = _parts[12]; + + const struct image_partition_entry *image_os_image = _parts[3]; + const struct image_partition_entry *image_file_system = _parts[4]; + + assert(strcmp(flash_os_image->name, "os-image") == 0); + assert(strcmp(flash_file_system->name, "file-system") == 0); + + assert(strcmp(image_os_image->name, "os-image") == 0); + assert(strcmp(image_file_system->name, "file-system") == 0); + + if (image_os_image->size > flash_os_image->size) + error(1, 0, "kernel image too big (more than %u bytes)", (unsigned)flash_os_image->size); + if (image_file_system->size > flash_file_system->size) + error(1, 0, "rootfs image too big (more than %u bytes)", (unsigned)flash_file_system->size); + + *len = flash_file_system->base - flash_os_image->base + image_file_system->size; + + uint8_t *image = malloc(*len); + if (!image) + error(1, errno, "malloc"); + + memset(image, 0xff, *len); + + memcpy(image, image_os_image->data, image_os_image->size); + memcpy(image + flash_file_system->base - flash_os_image->base,
[LEDE-DEV] [PATCH v3 07/10] ipq806x/profiles: Add Archer C2600
Signed-off-by: Ash Benz--- target/linux/ipq806x/profiles/tplink.mk | 20 1 file changed, 20 insertions(+) create mode 100644 target/linux/ipq806x/profiles/tplink.mk diff --git a/target/linux/ipq806x/profiles/tplink.mk b/target/linux/ipq806x/profiles/tplink.mk new file mode 100644 index 000..d3f5a6c --- /dev/null +++ b/target/linux/ipq806x/profiles/tplink.mk @@ -0,0 +1,20 @@ +# +# 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/C2600 + NAME:=TP-Link Archer C2600 + 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 ath10k-firmware-qca99x0 wpad-mini +endef + +define Profile/C2600/Description + Package set for the TP-Link Archer C2600. +endef +$(eval $(call Profile,C2600)) -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 01/10] include/image.mk: move build step tplink-safeloader to image.mk
Move tplink-safeloader from target/linux/ar71xx/image/tp-link.mk to include/image.mk Signed-off-by: Ash Benz--- include/image.mk | 12 target/linux/ar71xx/image/tp-link.mk | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/image.mk b/include/image.mk index fbb3a01..49315e5e 100644 --- a/include/image.mk +++ b/include/image.mk @@ -323,6 +323,18 @@ define Build/netgear-dni mv $@.new $@ endef +define Build/tplink-safeloader + -$(STAGING_DIR_HOST)/bin/tplink-safeloader \ + -B $(TPLINK_BOARD_NAME) \ + -V $(REVISION) \ + -k $(word 1,$^) \ + -r $@ \ + -o $@.new \ + -j \ + $(wordlist 2,$(words $(1)),$(1)) \ + $(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@ +endef + define Build/fit $(TOPDIR)/scripts/mkits.sh \ -D $(DEVICE_NAME) -o $@.its -k $@ \ diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk index a3af519..145fa0f 100644 --- a/target/linux/ar71xx/image/tp-link.mk +++ b/target/linux/ar71xx/image/tp-link.mk @@ -35,18 +35,6 @@ define Build/mktplinkfw-initramfs @mv $@.new $@ endef -define Build/tplink-safeloader - -$(STAGING_DIR_HOST)/bin/tplink-safeloader \ - -B $(TPLINK_BOARD_NAME) \ - -V $(REVISION) \ - -k $(word 1,$^) \ - -r $@ \ - -o $@.new \ - -j \ - $(wordlist 2,$(words $(1)),$(1)) \ - $(if $(findstring sysupgrade,$(word 1,$(1))),-S) && mv $@.new $@ || rm -f $@ -endef - define Device/tplink TPLINK_HWREV := 0x1 TPLINK_HEADER_VERSION := 1 -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 00/10] Add support for TP-Link Archer C2600 v1.0 and v1.1
Apologies for the bombardment. For some reason the first three in my previous submission don't seem to have gone through. New set with minor changes for kernel 4.4. Requires QCA's recently submitted ipq806x 4.4 patch. Generated against blogic's staging tree. Ash Benz (10): include/image.mk: move build step tplink-safeloader to image.mk fw-utils/tplink-safeloader.c: Add support for Archer C2600 ipq806x: Add Archer C2600 to image/Makefile ipq806x/base-files: Add Archer C2600 LEDs and board ipq806x/base-files: Add support for Archer C2600 ipq806x/base-files: extract ath10k caldata ipq806x/profiles: Add Archer C2600 ipq806x/dts: Add Archer C2600 DTS kernel/mac80211: skip ath10k OTP check if caldata found kernel/mtd: Add support for Macronix mx25u25635f, used in C2600 v1.1 include/image.mk | 12 + .../patches/936-ath10k_skip_otp_check.patch| 42 +++ target/linux/ar71xx/image/tp-link.mk | 12 - .../475-mtd-spi-nor-add-macronix-mx25u25635f.patch | 10 + .../linux/ipq806x/base-files/etc/board.d/01_leds | 7 + .../ipq806x/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 68 target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 + .../ipq806x/base-files/lib/upgrade/platform.sh | 20 +- target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts| 412 + target/linux/ipq806x/image/Makefile| 29 +- target/linux/ipq806x/profiles/tplink.mk| 20 + tools/firmware-utils/src/tplink-safeloader.c | 114 +- 13 files changed, 733 insertions(+), 17 deletions(-) create mode 100644 package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch create mode 100644 target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch create mode 100644 target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata create mode 100644 target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts create mode 100644 target/linux/ipq806x/profiles/tplink.mk -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [RFC 1/2] Add some common packages for x86-64 target.
On Fri, May 27, 2016 at 7:57 AM, Ben Greearwrote: > > > On 05/26/2016 11:33 PM, Bastian Bittorf wrote: >> >> * gree...@candelatech.com [27.05.2016 08:12]: >>> >>> From: Ben Greear >>> >>> This should make x86-64 targets more useable out of the box. >>> The assumption is that most x86-64 users have adequate storage, >> >> >> please dont. I understand your issues, but better define >> another profile like e.g. "bloated" (please search for a better name). >> this is the var "DEVICE_TYPE" - see 'git grep DEVICE_TYPE'. > > > I can just bake everything into the 2/2 'buildme.sh' logic with a bigger > diffconfig result file if there is no desire to tweak the core packages > for this platform. > > Truth is, I couldn't get 'igb' be selected with this patch anyway, so > the 2/2 logic is still needed anyway. It sounds like you are trying to get http://www.pcengines.ch/apu2c4.htm booted into openwrt? igb is kind of needed for that. :) - I am curious if the toolchain can enable the crypto (AES-NI) instructions on that chipand/or if various openwrt packages will use them? > > Thanks, > Ben > > -- > Ben Greear > Candela Technologies Inc http://www.candelatech.com > > > ___ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev -- Dave Täht Let's go make home routers and wifi faster! With better software! http://blog.cerowrt.org ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 02/10] fw-utils/tplink-safeloader.c: Add support for Archer C2600
Signed-off-by: Ash Benz--- tools/firmware-utils/src/tplink-safeloader.c | 114 ++- 1 file changed, 111 insertions(+), 3 deletions(-) diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c index 77a894b..2e204aa 100644 --- a/tools/firmware-utils/src/tplink-safeloader.c +++ b/tools/firmware-utils/src/tplink-safeloader.c @@ -105,6 +105,8 @@ static const uint8_t md5_salt[16] = { /** Vendor information for CPE210/220/510/520 */ static const char cpe510_vendor[] = "CPE510(TP-LINK|UN|N300-5):1.0\r\n"; +/** Vendor information for C2600 */ +static const char c2600_vendor[] = ""; /** The flash partition table for CPE210/220/510/520; @@ -128,6 +130,39 @@ static const struct flash_partition_entry cpe510_partitions[] = { }; /** +The flash partition table for C2600; +it is the same as the one used by the stock images. +*/ +static const struct flash_partition_entry c2600_partitions[] = { +{"SBL1", 0x0, 0x2}, +{"MIBIB", 0x2, 0x2}, +{"SBL2", 0x4, 0x2}, +{"SBL3", 0x6, 0x3}, +{"DDRCONFIG", 0x9, 0x1}, +{"SSD", 0xa, 0x1}, +{"TZ", 0xb, 0x3}, +{"RPM", 0xe, 0x2}, +{"fs-uboot", 0x10, 0x7}, +{"uboot-env", 0x17, 0x4}, +{"radio", 0x1b, 0x4}, +{"os-image", 0x1f, 0x20}, +{"file-system", 0x3f, 0x1b0}, +{"default-mac", 0x1ef, 0x00200}, +{"pin", 0x1ef0200, 0x00200}, +{"product-info", 0x1ef0400, 0x0fc00}, +{"partition-table", 0x1f0, 0x1}, +{"soft-version", 0x1f1, 0x1}, +{"support-list", 0x1f2, 0x1}, +{"profile", 0x1f3, 0x1}, +{"default-config", 0x1f4, 0x1}, +{"user-config", 0x1f5, 0x4}, +{"qos-db", 0x1f9, 0x4}, +{"usb-config", 0x1fd, 0x1}, +{"log", 0x1fe, 0x2}, + {NULL, 0, 0} +}; + +/** The support list for CPE210/220/510/520 */ static const char cpe510_support_list[] = @@ -141,6 +176,13 @@ static const char cpe510_support_list[] = "CPE220(TP-LINK|UN|N300-2):1.0\r\n" "CPE220(TP-LINK|UN|N300-2):1.1\r\n"; +/** + The support list for C2600 +*/ +static const char c2600_support_list[] = + "SupportList:\r\n" + "{product_name:Archer C2600,product_ver:1.0.0,special_id:}\r\n"; + #define error(_ret, _errno, _str, ...) \ do {\ fprintf(stderr, _str ": %s\n", ## __VA_ARGS__, \ @@ -240,14 +282,14 @@ 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 char *support_list) { +static struct image_partition_entry make_support_list(const char *support_list, bool trailzero) { 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'; + entry.data[len+8] = trailzero ? '\x00' : '\xff'; return entry; } @@ -436,6 +478,37 @@ static void * generate_sysupgrade_image(const struct flash_partition_entry *flas return image; } +static void * generate_sysupgrade_image_c2600(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 = _parts[11]; + const struct flash_partition_entry *flash_file_system = _parts[12]; + + const struct image_partition_entry *image_os_image = _parts[3]; + const struct image_partition_entry *image_file_system = _parts[4]; + + assert(strcmp(flash_os_image->name, "os-image") == 0); + assert(strcmp(flash_file_system->name, "file-system") == 0); + + assert(strcmp(image_os_image->name, "os-image") == 0); + assert(strcmp(image_file_system->name, "file-system") == 0); + + if (image_os_image->size > flash_os_image->size) + error(1, 0, "kernel image too big (more than %u bytes)", (unsigned)flash_os_image->size); + if (image_file_system->size > flash_file_system->size) + error(1, 0, "rootfs image too big (more than %u bytes)", (unsigned)flash_file_system->size); + + *len = flash_file_system->base - flash_os_image->base + image_file_system->size; + + uint8_t *image = malloc(*len); + if (!image) + error(1, errno, "malloc"); + + memset(image, 0xff, *len); + + memcpy(image, image_os_image->data, image_os_image->size); + memcpy(image + flash_file_system->base - flash_os_image->base,
[LEDE-DEV] [PATCH v3 00/10] Add support for TP-Link Archer C2600 v1.0 and v1.1
This patchset requires the recently submitted QCA ipq806x kernel 4.4 patches. Generated for blogic's staging tree. Changes compared to v2: - Minor updates for 4.4 bump. Ash Benz (10): include/image.mk: move build step tplink-safeloader to image.mk fw-utils/tplink-safeloader.c: Add support for Archer C2600 ipq806x: Add Archer C2600 to image/Makefile ipq806x/base-files: Add Archer C2600 LEDs and board ipq806x/base-files: Add support for Archer C2600 ipq806x/base-files: extract ath10k caldata ipq806x/profiles: Add Archer C2600 ipq806x/dts: Add Archer C2600 DTS kernel/mac80211: skip ath10k OTP check if caldata found kernel/mtd: Add support for Macronix mx25u25635f, used in C2600 v1.1 include/image.mk | 12 + .../patches/936-ath10k_skip_otp_check.patch| 42 +++ target/linux/ar71xx/image/tp-link.mk | 12 - .../475-mtd-spi-nor-add-macronix-mx25u25635f.patch | 10 + .../linux/ipq806x/base-files/etc/board.d/01_leds | 7 + .../ipq806x/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 68 target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 + .../ipq806x/base-files/lib/upgrade/platform.sh | 20 +- target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts| 412 + target/linux/ipq806x/image/Makefile| 29 +- target/linux/ipq806x/profiles/tplink.mk| 20 + tools/firmware-utils/src/tplink-safeloader.c | 114 +- 13 files changed, 733 insertions(+), 17 deletions(-) create mode 100644 package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch create mode 100644 target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch create mode 100644 target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata create mode 100644 target/linux/ipq806x/dts/qcom-ipq8064-c2600.dts create mode 100644 target/linux/ipq806x/profiles/tplink.mk -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 05/10] ipq806x/base-files: Add support for Archer C2600
Signed-off-by: Ash Benz--- target/linux/ipq806x/base-files/lib/ipq806x.sh | 3 +++ .../linux/ipq806x/base-files/lib/upgrade/platform.sh | 20 +++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/target/linux/ipq806x/base-files/lib/ipq806x.sh b/target/linux/ipq806x/base-files/lib/ipq806x.sh index db22708..73202c0 100644 --- a/target/linux/ipq806x/base-files/lib/ipq806x.sh +++ b/target/linux/ipq806x/base-files/lib/ipq806x.sh @@ -17,6 +17,9 @@ ipq806x_board_detect() { *"AP148") name="ap148" ;; + *"C2600") + name="c2600" + ;; *"D7800") name="d7800" ;; diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 542b5ce..a181f13 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -12,6 +12,14 @@ platform_check_image() { nand_do_platform_check $board $1 return $?; ;; + c2600) + local magic_long="$(get_magic_long "$1")" + [ "$magic_long" != "27051956" ] && { + echo "Invalid image, bad magic: $magic_long" + return 1 + } + return 0; + ;; *) return 1; esac @@ -29,4 +37,14 @@ platform_pre_upgrade() { esac } -# use default for platform_do_upgrade() +platform_do_upgrade() { + local board=$(ipq806x_board_name) + + case "$board" in + c2600) + PART_NAME="os-image:rootfs" + MTD_CONFIG_ARGS="-s 0x20" + default_do_upgrade "$ARGV" + ;; + esac +} -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 06/10] ipq806x/base-files: extract ath10k caldata
Signed-off-by: Ash Benz--- .../etc/hotplug.d/firmware/11-ath10k-caldata | 68 ++ 1 file changed, 68 insertions(+) create mode 100644 target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata new file mode 100644 index 000..5f604e1 --- /dev/null +++ b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -0,0 +1,68 @@ +#!/bin/sh + +ath10kcal_die() { + echo "ath10cal: " "$*" + exit 1 +} + +ath10kcal_from_file() { + local source=$1 + local offset=$2 + local count=$3 + + dd if=$source of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + ath10kcal_die "failed to extract calibration data from $source" +} + +ath10kcal_extract() { + local part=$1 + local offset=$2 + local count=$3 + local mtd + + mtd=$(find_mtd_chardev $part) + [ -n "$mtd" ] || \ + ath10kcal_die "no mtd device found for partition $part" + + dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + ath10kcal_die "failed to extract calibration data from $mtd" +} + +ath10kcal_patch_mac() { + local mac=$1 + + [ -z "$mac" ] && return + + macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=6 count=6 +} + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/ipq806x.sh +. /lib/functions.sh +. /lib/functions/system.sh + +board=$(ipq806x_board_name) + + +case "$FIRMWARE" in +"ath10k/cal-pci-:01:00.0.bin") + case $board in + c2600) + ath10kcal_extract "radio" 4096 12064 +# ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 8) -1) + ;; + esac + ;; +"ath10k/cal-pci-0001:01:00.0.bin") + case $board in + c2600) + ath10kcal_extract "radio" 20480 12064 +# ath10kcal_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 8) -2) + ;; + esac + ;; +*) + exit 1 + ;; +esac -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 10/10] kernel/mtd: Add support for Macronix mx25u25635f, used in C2600 v1.1
Signed-off-by: Ash Benz--- .../patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch diff --git a/target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch b/target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch new file mode 100644 index 000..c2aa418 --- /dev/null +++ b/target/linux/generic/patches-4.4/475-mtd-spi-nor-add-macronix-mx25u25635f.patch @@ -0,0 +1,10 @@ +--- a/drivers/mtd/spi-nor/spi-nor.c b/drivers/mtd/spi-nor/spi-nor.c +@@ -722,6 +722,7 @@ static const struct flash_info spi_nor_i + { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, + { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, + { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) }, ++ { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, 0) }, + { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, + { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_QUAD_READ) }, + { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, SPI_NOR_QUAD_READ) }, -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 09/10] kernel/mac80211: skip ath10k OTP check if caldata found
Signed-off-by: Ash Benz--- .../patches/936-ath10k_skip_otp_check.patch| 42 ++ 1 file changed, 42 insertions(+) create mode 100644 package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch diff --git a/package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch b/package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch new file mode 100644 index 000..39aba41 --- /dev/null +++ b/package/kernel/mac80211/patches/936-ath10k_skip_otp_check.patch @@ -0,0 +1,42 @@ +--- a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c +@@ -1165,9 +1165,6 @@ static int ath10k_core_fetch_firmware_fi + { + int ret; + +- /* calibration file is optional, don't check for any errors */ +- ath10k_fetch_cal_file(ar); +- + ar->fw_api = 5; + ath10k_dbg(ar, ATH10K_DBG_BOOT, "trying fw api %d\n", ar->fw_api); + +@@ -1870,6 +1867,9 @@ static int ath10k_core_probe_fw(struct a + goto err_power_down; + } + ++ /* calibration file is optional, don't check for any errors */ ++ int calret = ath10k_fetch_cal_file(ar); ++ + ret = ath10k_core_fetch_firmware_files(ar); + if (ret) { + ath10k_err(ar, "could not fetch firmware files (%d)\n", ret); +@@ -1892,11 +1892,14 @@ static int ath10k_core_probe_fw(struct a + "could not load pre cal data: %d\n", ret); + } + +- 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", +- ret); +- goto err_free_firmware_files; ++ /* otp and board file not needed if calibration data is present */ ++ if (calret) { ++ 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", ++ ret); ++ return ret; ++ } + } + + ret = ath10k_core_fetch_board_file(ar); -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
[LEDE-DEV] [PATCH v3 07/10] ipq806x/profiles: Add Archer C2600
Signed-off-by: Ash Benz--- target/linux/ipq806x/profiles/tplink.mk | 20 1 file changed, 20 insertions(+) create mode 100644 target/linux/ipq806x/profiles/tplink.mk diff --git a/target/linux/ipq806x/profiles/tplink.mk b/target/linux/ipq806x/profiles/tplink.mk new file mode 100644 index 000..d3f5a6c --- /dev/null +++ b/target/linux/ipq806x/profiles/tplink.mk @@ -0,0 +1,20 @@ +# +# 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/C2600 + NAME:=TP-Link Archer C2600 + 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 ath10k-firmware-qca99x0 wpad-mini +endef + +define Profile/C2600/Description + Package set for the TP-Link Archer C2600. +endef +$(eval $(call Profile,C2600)) -- 2.1.4 ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [RFC 1/2] Add some common packages for x86-64 target.
On 05/26/2016 11:33 PM, Bastian Bittorf wrote: * gree...@candelatech.com[27.05.2016 08:12]: From: Ben Greear This should make x86-64 targets more useable out of the box. The assumption is that most x86-64 users have adequate storage, please dont. I understand your issues, but better define another profile like e.g. "bloated" (please search for a better name). this is the var "DEVICE_TYPE" - see 'git grep DEVICE_TYPE'. I can just bake everything into the 2/2 'buildme.sh' logic with a bigger diffconfig result file if there is no desire to tweak the core packages for this platform. Truth is, I couldn't get 'igb' be selected with this patch anyway, so the 2/2 logic is still needed anyway. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [PATCH 2/2] Add script to build common platforms.
On 05/27/2016 02:46 AM, Karl Palsson wrote: gree...@candelatech.com wrote: From: Ben GreearThe idea is to be able to allow newbies to easily build images for common hardware. These images should be user-friendly, including luci and other tools that may aid debugging and use of the platform. Signed-off-by: Ben Greear --- buildme.sh| 76 +++ buildme_targets/x86_64/diffconfig.txt | 26 2 files changed, 102 insertions(+) create mode 100755 buildme.sh create mode 100644 buildme_targets/x86_64/diffconfig.txt While I've written similar scripts for helping colleagues bootstrap a build, I'm not entirely convinced that adding more piles of shell script to the build tree is necessarily an improvement, if the goal is helping people build an image that suits them. My goal is more to have an easy way to build a useful image that should work for most people. Lots of people and organizations have their own forks and scripts, and it seems much of the changes are just tweaks how to the core project is built. If we can bring some of this into the main tree maybe that will help everyone work closer to upstream code. Extending the README would help, but I don't think a beginner should have to go through menuconfig at all. It can be overwhelming even for those of us who have seen similar things before. (Try to select 'igb' as 'y' for instance, it takes manually enabling multiple obscure other features before it will even work). lede, like openwrt before it, still has large piles of undocumented usage methods, only uncovered by digging through script after script. Adding more scripts to hide the complexity/flexibility/power of some of those other scripts doesn't seem like a net gain. A well commented buildme.sh would be a good place to start understanding the build process. At least for me, just finding the other scripts is often the hardest part...so if buildme.sh is adding a package with a feeds cmd, then that is a very useful piece of knowledge. Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] [OpenWrt-Devel] TR-069 for OpenWrt
Hi Karl, On Fri, May 27, 2016 at 1:55 PM, Karl Palssonwrote: > > David Lang wrote: >> On Thu, 26 May 2016, Delbar Jos wrote: >> >> > We are conscious of the fact that together with the proposals made by >> > Felix, >> > Luka and Wojtek we are now looking at many "competing" proposals. As a next >> > step, we recommend to organize a workshop, at a practical location and >> > time, >> > where we put everything on the table and define the most appropriate path >> > forward to the benefit of OpenWrt as a whole. >> >> nothing wrong with supporting many different remote management >> daemons. >> >> > TR-069 is a complicated remote management system and in order to make this >> > initiative a success, we must ensure that the complexity is handled in an >> > elegant way and with respect for OpenWrt's core architecture. More than on >> > the >> > protocol itself, we believe that we should focus on the architectural >> > enhancements required to support remote management in general. >> >> What is it that you think is needed to "support remote >> management in general"? >> >> It's worth pointing out that many people are remotely managing >> OpenWRT devices, Ansible/Salt/Puppet/Chef/etc are all common >> tools for the job. > > Really? python, python, ruby, ruby. None of those are really fun enjoyable > tasks on _my_ openwrt/leded devices. > >> now, those are all tools aimed at managing Linux Servers, not >> networking gear, but OpenWRT is a server. >> >> So I'd suggest starting off by creating a daemon that talks >> and just stores the stuff it's sent in some >> simple files so that it can return the info when queried. > > Did you read the intro to Delbar's mail, describing that they > already have a complete tr069 project, for managing openwrt > devices, that they want to open source, and want to collaborate > on making it more useful for all, and perhaps see if there are > common pain points that can be resolved by handling things > differently on the lede/openwrt side, rather than working around > on the tr069 side? > > I think it's exciting and I'd love to hear more about it. > ansible/salt/puppet/chef have been far too heavy to run, and > openvpn servers granting remote shell access is far too tedious > for daily use. I am very interested to see TR-069 solution. IMHO what is really useful in it is Amendment 5, NAT traversal based on XMMP. Both AllJoyn and Iotivity seem to push this approach to managing CPEs - naturally, it has been proven and widely used. For the reference, here is an interesting discussion I had with Thiago Macieira from Iotivity: https://lists.linuxfoundation.org/pipermail/iotivity-dev/2015-October/002867.html However, I would personally look more at OMA LwM2M - it would be much lighter and more fun to implement ;). NAT traversal is not so straightforward, but it would be interesting to investigate it. Then clients will be ultra-light. BR, Drasko ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev
Re: [LEDE-DEV] TR-069 for OpenWrt
David Langwrote: > On Thu, 26 May 2016, Delbar Jos wrote: > > > We are conscious of the fact that together with the proposals made by > > Felix, > > Luka and Wojtek we are now looking at many "competing" proposals. As a next > > step, we recommend to organize a workshop, at a practical location and > > time, > > where we put everything on the table and define the most appropriate path > > forward to the benefit of OpenWrt as a whole. > > nothing wrong with supporting many different remote management > daemons. > > > TR-069 is a complicated remote management system and in order to make this > > initiative a success, we must ensure that the complexity is handled in an > > elegant way and with respect for OpenWrt's core architecture. More than on > > the > > protocol itself, we believe that we should focus on the architectural > > enhancements required to support remote management in general. > > What is it that you think is needed to "support remote > management in general"? > > It's worth pointing out that many people are remotely managing > OpenWRT devices, Ansible/Salt/Puppet/Chef/etc are all common > tools for the job. Really? python, python, ruby, ruby. None of those are really fun enjoyable tasks on _my_ openwrt/leded devices. > now, those are all tools aimed at managing Linux Servers, not > networking gear, but OpenWRT is a server. > > So I'd suggest starting off by creating a daemon that talks > and just stores the stuff it's sent in some > simple files so that it can return the info when queried. Did you read the intro to Delbar's mail, describing that they already have a complete tr069 project, for managing openwrt devices, that they want to open source, and want to collaborate on making it more useful for all, and perhaps see if there are common pain points that can be resolved by handling things differently on the lede/openwrt side, rather than working around on the tr069 side? I think it's exciting and I'd love to hear more about it. ansible/salt/puppet/chef have been far too heavy to run, and openvpn servers granting remote shell access is far too tedious for daily use. Cheers, Karl P signature.asc Description: OpenPGP Digital Signature ___ Lede-dev mailing list Lede-dev@lists.infradead.org http://lists.infradead.org/mailman/listinfo/lede-dev