From patchwork Sun Oct 22 20:21:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829076 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrYL3GWgz9sRV for ; Mon, 23 Oct 2017 07:22:14 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CAE32B91519; Sun, 22 Oct 2017 22:21:40 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:21:40 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id D925AB8060E for ; Sun, 22 Oct 2017 22:21:31 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006hG-Ed from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:19 +0200 Message-Id: <1508703687-25650-2-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 1/9] hwmon-coretemp: add thermal monitor for Core/Core2/Atom X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Philip Prindeville Signed-off-by: Philip Prindeville --- package/kernel/linux/modules/hwmon.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk index ed05cae..ae1a004 100644 --- a/package/kernel/linux/modules/hwmon.mk +++ b/package/kernel/linux/modules/hwmon.mk @@ -108,6 +108,21 @@ endef $(eval $(call KernelPackage,hwmon-nct6775)) +define KernelPackage/hwmon-coretemp + TITLE:=Intel Core/Core2/Atom thermal monitoring support + KCONFIG:=CONFIG_SENSORS_CORETEMP + FILES:=$(LINUX_DIR)/drivers/hwmon/coretemp.ko + AUTOLOAD:=$(call AutoProbe,coretemp) + $(call AddDepends/hwmon,@TARGET_x86) +endef + +define KernelPackage/hwmon-coretemp/description + Kernel module for Intel Core/Core2/Atom thermal monitor chip +endef + +$(eval $(call KernelPackage,hwmon-coretemp)) + + define KernelPackage/hwmon-ina2xx TITLE:=INA2XX monitoring support KCONFIG:=CONFIG_SENSORS_INA2XX From patchwork Sun Oct 22 20:21:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829090 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrbP2Sk2z9sRm for ; Mon, 23 Oct 2017 07:24:01 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 871A7B91596; Sun, 22 Oct 2017 22:22:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:22:10 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 7C2B4B8011B for ; Sun, 22 Oct 2017 22:21:32 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006hc-FD from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:20 +0200 Message-Id: <1508703687-25650-3-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 2/9] package: kernel: dtc: Add device tree compiler package X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Marek Vasut Add package with the DT compiler v1.4.1 . Signed-off-by: Marek Vasut --- package/kernel/dtc/Makefile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 package/kernel/dtc/Makefile diff --git a/package/kernel/dtc/Makefile b/package/kernel/dtc/Makefile new file mode 100644 index 0000000..5155323 --- /dev/null +++ b/package/kernel/dtc/Makefile @@ -0,0 +1,36 @@ +# +# Copyright (C) 2016 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=dtc +PKG_VERSION:=1.4.1 +PKG_RELEASE=$(PKG_SOURCE_VERSION) + +PKG_SOURCE_URL:=git://git.kernel.org/pub/scm/utils/dtc/dtc.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz + +PKG_MAINTAINER:=Marek Vasut +PKG_LICENSE:=GPL-2.0+ + +include $(INCLUDE_DIR)/package.mk + +define Package/dtc + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Device Tree Compiler +endef + +define Package/dtc/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/dtc $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,dtc)) From patchwork Sun Oct 22 20:21:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829089 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrb66lGnz9sRm for ; Mon, 23 Oct 2017 07:23:46 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 2389FB91591; Sun, 22 Oct 2017 22:22:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:22:05 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 0BCD4B800BD for ; Sun, 22 Oct 2017 22:21:32 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006i6-Fu from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:21 +0200 Message-Id: <1508703687-25650-4-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 3/9] package: kernel: dtc: Add DTO support X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Marek Vasut Add patch with the DT overlay support into the DTC package. Signed-off-by: Marek Vasut --- ...ripts-dtc-Update-to-version-with-overlays.patch | 642 +++++++++++++++++++++ 1 file changed, 642 insertions(+) create mode 100644 package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch diff --git a/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch b/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch new file mode 100644 index 0000000..605d303 --- /dev/null +++ b/package/kernel/dtc/patches/0001-scripts-dtc-Update-to-version-with-overlays.patch @@ -0,0 +1,642 @@ +From 5f84cb93eef9f8a8ff7f49d593893f252744d0fe Mon Sep 17 00:00:00 2001 +From: Pantelis Antoniou +Date: Wed, 26 Aug 2015 18:28:08 +0300 +Subject: [PATCH] scripts/dtc: Update to version with overlays + +Update to mainline dtc with overlay support + +Signed-off-by: Pantelis Antoniou +--- + checks.c | 20 +++++- + dtc-lexer.l | 5 ++ + dtc-parser.y | 54 ++++++++++++++-- + dtc.c | 83 ++++++++++++++++++++++-- + dtc.h | 13 +++- + livetree.c | 202 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + treesource.c | 3 + + util.c | 2 +- + 8 files changed, 367 insertions(+), 15 deletions(-) + +diff --git a/checks.c b/checks.c +index 3bf0fa4..af25c2b 100644 +--- a/checks.c ++++ b/checks.c +@@ -465,8 +465,12 @@ static void fixup_phandle_references(struct check *c, struct node *dt, + + refnode = get_node_by_ref(dt, m->ref); + if (! refnode) { +- FAIL(c, "Reference to non-existent node or label \"%s\"\n", +- m->ref); ++ if (!source_is_plugin) ++ FAIL(c, "Reference to non-existent node or " ++ "label \"%s\"\n", m->ref); ++ else /* mark the entry as unresolved */ ++ *((cell_t *)(prop->val.val + m->offset)) = ++ cpu_to_fdt32(0xffffffff); + continue; + } + +@@ -559,7 +563,7 @@ static void check_reg_format(struct check *c, struct node *dt, + size_cells = node_size_cells(node->parent); + entrylen = (addr_cells + size_cells) * sizeof(cell_t); + +- if ((prop->val.len % entrylen) != 0) ++ if (!entrylen || (prop->val.len % entrylen) != 0) + FAIL(c, "\"reg\" property in %s has invalid length (%d bytes) " + "(#address-cells == %d, #size-cells == %d)", + node->fullpath, prop->val.len, addr_cells, size_cells); +@@ -651,6 +655,15 @@ static void check_obsolete_chosen_interrupt_controller(struct check *c, + } + TREE_WARNING(obsolete_chosen_interrupt_controller, NULL); + ++static void check_deprecated_plugin_syntax(struct check *c, ++ struct node *dt) ++{ ++ if (deprecated_plugin_syntax_warning) ++ FAIL(c, "Use '/dts-v1/ /plugin/'; syntax. /dts-v1/; /plugin/; " ++ "is going to be removed in next versions"); ++} ++TREE_WARNING(deprecated_plugin_syntax, NULL); ++ + static struct check *check_table[] = { + &duplicate_node_names, &duplicate_property_names, + &node_name_chars, &node_name_format, &property_name_chars, +@@ -668,6 +681,7 @@ static struct check *check_table[] = { + + &avoid_default_addr_size, + &obsolete_chosen_interrupt_controller, ++ &deprecated_plugin_syntax, + + &always_fail, + }; +diff --git a/dtc-lexer.l b/dtc-lexer.l +index 0ee1caf..dd44ba2 100644 +--- a/dtc-lexer.l ++++ b/dtc-lexer.l +@@ -113,6 +113,11 @@ static void lexical_error(const char *fmt, ...); + return DT_V1; + } + ++<*>"/plugin/" { ++ DPRINT("Keyword: /plugin/\n"); ++ return DT_PLUGIN; ++ } ++ + <*>"/memreserve/" { + DPRINT("Keyword: /memreserve/\n"); + BEGIN_DEFAULT(); +diff --git a/dtc-parser.y b/dtc-parser.y +index ea57e0a..7d9652d 100644 +--- a/dtc-parser.y ++++ b/dtc-parser.y +@@ -19,6 +19,7 @@ + */ + %{ + #include ++#include + + #include "dtc.h" + #include "srcpos.h" +@@ -52,9 +53,11 @@ extern bool treesource_error; + struct node *nodelist; + struct reserve_info *re; + uint64_t integer; ++ bool is_plugin; + } + + %token DT_V1 ++%token DT_PLUGIN + %token DT_MEMRESERVE + %token DT_LSHIFT DT_RSHIFT DT_LE DT_GE DT_EQ DT_NE DT_AND DT_OR + %token DT_BITS +@@ -71,6 +74,7 @@ extern bool treesource_error; + + %type propdata + %type propdataprefix ++%type plugindecl + %type memreserve + %type memreserves + %type arrayprefix +@@ -101,10 +105,39 @@ extern bool treesource_error; + %% + + sourcefile: +- DT_V1 ';' memreserves devicetree ++ basesource ++ | pluginsource ++ ; ++ ++basesource: ++ DT_V1 ';' plugindecl memreserves devicetree ++ { ++ source_is_plugin = $3; ++ if (source_is_plugin) ++ deprecated_plugin_syntax_warning = true; ++ the_boot_info = build_boot_info($4, $5, ++ guess_boot_cpuid($5)); ++ } ++ ; ++ ++plugindecl: ++ /* empty */ ++ { ++ $$ = false; ++ } ++ | DT_PLUGIN ';' ++ { ++ $$ = true; ++ } ++ ; ++ ++pluginsource: ++ DT_V1 DT_PLUGIN ';' memreserves devicetree + { +- the_boot_info = build_boot_info($3, $4, +- guess_boot_cpuid($4)); ++ source_is_plugin = true; ++ deprecated_plugin_syntax_warning = false; ++ the_boot_info = build_boot_info($4, $5, ++ guess_boot_cpuid($5)); + } + ; + +@@ -144,10 +177,14 @@ devicetree: + { + struct node *target = get_node_by_ref($1, $2); + +- if (target) ++ if (target) { + merge_nodes(target, $3); +- else +- ERROR(&@2, "Label or path %s not found", $2); ++ } else { ++ if (symbol_fixup_support) ++ add_orphan_node($1, $3, $2); ++ else ++ ERROR(&@2, "Label or path %s not found", $2); ++ } + $$ = $1; + } + | devicetree DT_DEL_NODE DT_REF ';' +@@ -162,6 +199,11 @@ devicetree: + + $$ = $1; + } ++ | /* empty */ ++ { ++ /* build empty node */ ++ $$ = name_node(build_node(NULL, NULL), ""); ++ } + ; + + nodedef: +diff --git a/dtc.c b/dtc.c +index 8c4add6..ee37be9 100644 +--- a/dtc.c ++++ b/dtc.c +@@ -18,6 +18,8 @@ + * USA + */ + ++#include ++ + #include "dtc.h" + #include "srcpos.h" + +@@ -29,6 +31,8 @@ int reservenum; /* Number of memory reservation slots */ + int minsize; /* Minimum blob size */ + int padsize; /* Additional padding to blob */ + int phandle_format = PHANDLE_BOTH; /* Use linux,phandle or phandle properties */ ++int symbol_fixup_support; ++int auto_label_aliases; + + static void fill_fullpaths(struct node *tree, const char *prefix) + { +@@ -51,7 +55,7 @@ static void fill_fullpaths(struct node *tree, const char *prefix) + #define FDT_VERSION(version) _FDT_VERSION(version) + #define _FDT_VERSION(version) #version + static const char usage_synopsis[] = "dtc [options] "; +-static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:hv"; ++static const char usage_short_opts[] = "qI:O:o:V:d:R:S:p:fb:i:H:sW:E:@Ahv"; + static struct option const usage_long_opts[] = { + {"quiet", no_argument, NULL, 'q'}, + {"in-format", a_argument, NULL, 'I'}, +@@ -69,6 +73,8 @@ static struct option const usage_long_opts[] = { + {"phandle", a_argument, NULL, 'H'}, + {"warning", a_argument, NULL, 'W'}, + {"error", a_argument, NULL, 'E'}, ++ {"symbols", no_argument, NULL, '@'}, ++ {"auto-alias", no_argument, NULL, 'A'}, + {"help", no_argument, NULL, 'h'}, + {"version", no_argument, NULL, 'v'}, + {NULL, no_argument, NULL, 0x0}, +@@ -99,16 +105,63 @@ static const char * const usage_opts_help[] = { + "\t\tboth - Both \"linux,phandle\" and \"phandle\" properties", + "\n\tEnable/disable warnings (prefix with \"no-\")", + "\n\tEnable/disable errors (prefix with \"no-\")", ++ "\n\tEnable symbols/fixup support", ++ "\n\tEnable auto-alias of labels", + "\n\tPrint this help and exit", + "\n\tPrint version and exit", + NULL, + }; + ++static const char *guess_type_by_name(const char *fname, const char *fallback) ++{ ++ const char *s; ++ ++ s = strrchr(fname, '.'); ++ if (s == NULL) ++ return fallback; ++ if (!strcasecmp(s, ".dts")) ++ return "dts"; ++ if (!strcasecmp(s, ".dtb")) ++ return "dtb"; ++ return fallback; ++} ++ ++static const char *guess_input_format(const char *fname, const char *fallback) ++{ ++ struct stat statbuf; ++ uint32_t magic; ++ FILE *f; ++ ++ if (stat(fname, &statbuf) != 0) ++ return fallback; ++ ++ if (S_ISDIR(statbuf.st_mode)) ++ return "fs"; ++ ++ if (!S_ISREG(statbuf.st_mode)) ++ return fallback; ++ ++ f = fopen(fname, "r"); ++ if (f == NULL) ++ return fallback; ++ if (fread(&magic, 4, 1, f) != 1) { ++ fclose(f); ++ return fallback; ++ } ++ fclose(f); ++ ++ magic = fdt32_to_cpu(magic); ++ if (magic == FDT_MAGIC) ++ return "dtb"; ++ ++ return guess_type_by_name(fname, fallback); ++} ++ + int main(int argc, char *argv[]) + { + struct boot_info *bi; +- const char *inform = "dts"; +- const char *outform = "dts"; ++ const char *inform = NULL; ++ const char *outform = NULL; + const char *outname = "-"; + const char *depname = NULL; + bool force = false, sort = false; +@@ -186,7 +239,12 @@ int main(int argc, char *argv[]) + case 'E': + parse_checks_option(false, true, optarg); + break; +- ++ case '@': ++ symbol_fixup_support = 1; ++ break; ++ case 'A': ++ auto_label_aliases = 1; ++ break; + case 'h': + usage(NULL); + default: +@@ -213,6 +271,17 @@ int main(int argc, char *argv[]) + fprintf(depfile, "%s:", outname); + } + ++ if (inform == NULL) ++ inform = guess_input_format(arg, "dts"); ++ if (outform == NULL) { ++ outform = guess_type_by_name(outname, NULL); ++ if (outform == NULL) { ++ if (streq(inform, "dts")) ++ outform = "dtb"; ++ else ++ outform = "dts"; ++ } ++ } + if (streq(inform, "dts")) + bi = dt_from_source(arg); + else if (streq(inform, "fs")) +@@ -236,6 +305,12 @@ int main(int argc, char *argv[]) + if (sort) + sort_tree(bi); + ++ if (symbol_fixup_support || auto_label_aliases) ++ generate_label_node(bi->dt, bi->dt); ++ ++ if (symbol_fixup_support) ++ generate_fixups_node(bi->dt, bi->dt); ++ + if (streq(outname, "-")) { + outf = stdout; + } else { +diff --git a/dtc.h b/dtc.h +index 56212c8..d025111 100644 +--- a/dtc.h ++++ b/dtc.h +@@ -20,7 +20,7 @@ + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ +- ++#define _GNU_SOURCE + #include + #include + #include +@@ -54,6 +54,14 @@ extern int reservenum; /* Number of memory reservation slots */ + extern int minsize; /* Minimum blob size */ + extern int padsize; /* Additional padding to blob */ + extern int phandle_format; /* Use linux,phandle or phandle properties */ ++extern int symbol_fixup_support;/* enable symbols & fixup support */ ++extern int auto_label_aliases; /* auto generate labels -> aliases */ ++ ++/* ++ * Tree source globals ++ */ ++extern bool source_is_plugin; ++extern bool deprecated_plugin_syntax_warning; + + #define PHANDLE_LEGACY 0x1 + #define PHANDLE_EPAPR 0x2 +@@ -194,6 +202,7 @@ struct node *build_node_delete(void); + struct node *name_node(struct node *node, char *name); + struct node *chain_node(struct node *first, struct node *list); + struct node *merge_nodes(struct node *old_node, struct node *new_node); ++void add_orphan_node(struct node *old_node, struct node *new_node, char *ref); + + void add_property(struct node *node, struct property *prop); + void delete_property_by_name(struct node *node, char *name); +@@ -244,6 +253,8 @@ struct boot_info { + struct boot_info *build_boot_info(struct reserve_info *reservelist, + struct node *tree, uint32_t boot_cpuid_phys); + void sort_tree(struct boot_info *bi); ++void generate_label_node(struct node *node, struct node *dt); ++void generate_fixups_node(struct node *node, struct node *dt); + + /* Checks */ + +diff --git a/livetree.c b/livetree.c +index e229b84..1ef9fc4 100644 +--- a/livetree.c ++++ b/livetree.c +@@ -216,6 +216,34 @@ struct node *merge_nodes(struct node *old_node, struct node *new_node) + return old_node; + } + ++void add_orphan_node(struct node *dt, struct node *new_node, char *ref) ++{ ++ static unsigned int next_orphan_fragment = 0; ++ struct node *ovl = xmalloc(sizeof(*ovl)); ++ struct property *p; ++ struct data d = empty_data; ++ char *name; ++ int ret; ++ ++ memset(ovl, 0, sizeof(*ovl)); ++ ++ d = data_add_marker(d, REF_PHANDLE, ref); ++ d = data_append_integer(d, 0xffffffff, 32); ++ ++ p = build_property("target", d); ++ add_property(ovl, p); ++ ++ ret = asprintf(&name, "fragment@%u", ++ next_orphan_fragment++); ++ if (ret == -1) ++ die("asprintf() failed\n"); ++ name_node(ovl, name); ++ name_node(new_node, "__overlay__"); ++ ++ add_child(dt, ovl); ++ add_child(ovl, new_node); ++} ++ + struct node *chain_node(struct node *first, struct node *list) + { + assert(first->next_sibling == NULL); +@@ -709,3 +737,177 @@ void sort_tree(struct boot_info *bi) + sort_reserve_entries(bi); + sort_node(bi->dt); + } ++ ++void generate_label_node(struct node *node, struct node *dt) ++{ ++ struct node *c, *an; ++ struct property *p; ++ struct label *l; ++ int has_label; ++ char *gen_node_name; ++ ++ if (auto_label_aliases) ++ gen_node_name = "aliases"; ++ else ++ gen_node_name = "__symbols__"; ++ ++ /* Make sure the label isn't already there */ ++ has_label = 0; ++ for_each_label(node->labels, l) { ++ has_label = 1; ++ break; ++ } ++ ++ if (has_label) { ++ ++ /* an is the aliases/__symbols__ node */ ++ an = get_subnode(dt, gen_node_name); ++ /* if no node exists, create it */ ++ if (!an) { ++ an = build_node(NULL, NULL); ++ name_node(an, gen_node_name); ++ add_child(dt, an); ++ } ++ ++ /* now add the label in the node */ ++ for_each_label(node->labels, l) { ++ /* check whether the label already exists */ ++ p = get_property(an, l->label); ++ if (p) { ++ fprintf(stderr, "WARNING: label %s already" ++ " exists in /%s", l->label, ++ gen_node_name); ++ continue; ++ } ++ ++ /* insert it */ ++ p = build_property(l->label, ++ data_copy_escape_string(node->fullpath, ++ strlen(node->fullpath))); ++ add_property(an, p); ++ } ++ ++ /* force allocation of a phandle for this node */ ++ if (symbol_fixup_support) ++ (void)get_node_phandle(dt, node); ++ } ++ ++ for_each_child(node, c) ++ generate_label_node(c, dt); ++} ++ ++static void add_fixup_entry(struct node *dt, struct node *node, ++ struct property *prop, struct marker *m) ++{ ++ struct node *fn; /* local fixup node */ ++ struct property *p; ++ char *fixups_name = "__fixups__"; ++ struct data d; ++ char *entry; ++ int ret; ++ ++ /* fn is the node we're putting entries in */ ++ fn = get_subnode(dt, fixups_name); ++ /* if no node exists, create it */ ++ if (!fn) { ++ fn = build_node(NULL, NULL); ++ name_node(fn, fixups_name); ++ add_child(dt, fn); ++ } ++ ++ ret = asprintf(&entry, "%s:%s:%u", ++ node->fullpath, prop->name, m->offset); ++ if (ret == -1) ++ die("asprintf() failed\n"); ++ ++ p = get_property(fn, m->ref); ++ d = data_append_data(p ? p->val : empty_data, entry, strlen(entry) + 1); ++ if (!p) ++ add_property(fn, build_property(m->ref, d)); ++ else ++ p->val = d; ++} ++ ++static void add_local_fixup_entry(struct node *dt, struct node *node, ++ struct property *prop, struct marker *m, ++ struct node *refnode) ++{ ++ struct node *lfn, *wn, *nwn; /* local fixup node, walk node, new */ ++ struct property *p; ++ struct data d; ++ char *local_fixups_name = "__local_fixups__"; ++ char *s, *e, *comp; ++ int len; ++ ++ /* fn is the node we're putting entries in */ ++ lfn = get_subnode(dt, local_fixups_name); ++ /* if no node exists, create it */ ++ if (!lfn) { ++ lfn = build_node(NULL, NULL); ++ name_node(lfn, local_fixups_name); ++ add_child(dt, lfn); ++ } ++ ++ /* walk the path components creating nodes if they don't exist */ ++ comp = NULL; ++ /* start skipping the first / */ ++ s = node->fullpath + 1; ++ wn = lfn; ++ while (*s) { ++ /* retrieve path component */ ++ e = strchr(s, '/'); ++ if (e == NULL) ++ e = s + strlen(s); ++ len = e - s; ++ comp = xrealloc(comp, len + 1); ++ memcpy(comp, s, len); ++ comp[len] = '\0'; ++ ++ /* if no node exists, create it */ ++ nwn = get_subnode(wn, comp); ++ if (!nwn) { ++ nwn = build_node(NULL, NULL); ++ name_node(nwn, strdup(comp)); ++ add_child(wn, nwn); ++ } ++ wn = nwn; ++ ++ /* last path component */ ++ if (!*e) ++ break; ++ ++ /* next path component */ ++ s = e + 1; ++ } ++ free(comp); ++ ++ p = get_property(wn, prop->name); ++ d = data_append_cell(p ? p->val : empty_data, (cell_t)m->offset); ++ if (!p) ++ add_property(wn, build_property(prop->name, d)); ++ else ++ p->val = d; ++} ++ ++void generate_fixups_node(struct node *node, struct node *dt) ++{ ++ struct node *c; ++ struct property *prop; ++ struct marker *m; ++ struct node *refnode; ++ ++ for_each_property(node, prop) { ++ m = prop->val.markers; ++ for_each_marker_of_type(m, REF_PHANDLE) { ++ refnode = get_node_by_ref(dt, m->ref); ++ if (!refnode) ++ add_fixup_entry(dt, node, prop, m); ++ else ++ add_local_fixup_entry(dt, node, prop, m, ++ refnode); ++ } ++ } ++ ++ for_each_child(node, c) ++ generate_fixups_node(c, dt); ++} +diff --git a/treesource.c b/treesource.c +index a55d1d1..e1d6657 100644 +--- a/treesource.c ++++ b/treesource.c +@@ -28,6 +28,9 @@ extern YYLTYPE yylloc; + struct boot_info *the_boot_info; + bool treesource_error; + ++bool source_is_plugin; ++bool deprecated_plugin_syntax_warning; ++ + struct boot_info *dt_from_source(const char *fname) + { + the_boot_info = NULL; +diff --git a/util.c b/util.c +index 9d65226..cbb945b 100644 +--- a/util.c ++++ b/util.c +@@ -349,7 +349,6 @@ int utilfdt_decode_type(const char *fmt, int *type, int *size) + void utilfdt_print_data(const char *data, int len) + { + int i; +- const char *p = data; + const char *s; + + /* no data, don't print */ +@@ -376,6 +375,7 @@ void utilfdt_print_data(const char *data, int len) + i < (len - 1) ? " " : ""); + printf(">"); + } else { ++ const unsigned char *p = (const unsigned char *)data; + printf(" = ["); + for (i = 0; i < len; i++) + printf("%02x%s", *p++, i < len - 1 ? " " : ""); +-- +2.7.0 + From patchwork Sun Oct 22 20:21:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829082 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrZK0FVxz9sRg for ; Mon, 23 Oct 2017 07:23:04 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id BD92EB9157C; Sun, 22 Oct 2017 22:21:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:21:51 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id C3080B80607 for ; Sun, 22 Oct 2017 22:21:31 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006iU-GR from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:22 +0200 Message-Id: <1508703687-25650-5-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 4/9] openssl: fix cryptodev config dependency X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Ralph Sennhauser Signed-off-by: Ralph Sennhauser --- package/libs/openssl/Config.in | 1 + 1 file changed, 1 insertion(+) diff --git a/package/libs/openssl/Config.in b/package/libs/openssl/Config.in index dbcd11a..b949d3b 100644 --- a/package/libs/openssl/Config.in +++ b/package/libs/openssl/Config.in @@ -59,4 +59,5 @@ endif config OPENSSL_ENGINE_CRYPTO bool + select OPENSSL_HARDWARE_SUPPORT prompt "Crypto acceleration support" if PACKAGE_libopenssl From patchwork Sun Oct 22 20:21:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829081 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrZ15Nbvz9sRV for ; Mon, 23 Oct 2017 07:22:49 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 1F951B91575; Sun, 22 Oct 2017 22:21:48 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:21:48 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 5BB39B8057E for ; Sun, 22 Oct 2017 22:21:32 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006ik-Gr from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:23 +0200 Message-Id: <1508703687-25650-6-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 5/9] netfilter, iptables: add optional CHECKSUM module X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Denis Osvald Signed-off-by: Denis Osvald --- include/netfilter.mk | 4 ++++ package/kernel/linux/modules/netfilter.mk | 17 +++++++++++++++++ package/network/utils/iptables/Makefile | 10 ++++++++++ 3 files changed, 31 insertions(+) diff --git a/include/netfilter.mk b/include/netfilter.mk index 2d53758..3d735a8 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -262,6 +262,10 @@ $(eval $(if $(NF_KMOD),$(call nf_add,IPT_TEE,CONFIG_NF_DUP_IPV6, $(P_V6)nf_dup_i $(eval $(call nf_add,IPT_U32,CONFIG_NETFILTER_XT_MATCH_U32, $(P_XT)xt_u32)) +# checksum + +$(eval $(call nf_add,IPT_CHECKSUM,CONFIG_NETFILTER_XT_TARGET_CHECKSUM, $(P_XT)xt_CHECKSUM)) + # netlink diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 0ad6987..0d817ed 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -529,6 +529,23 @@ endef $(eval $(call KernelPackage,ipt-u32)) +define KernelPackage/ipt-checksum + TITLE:=CHECKSUM support + KCONFIG:= \ + CONFIG_NETFILTER_XT_TARGET_CHECKSUM + FILES:= \ + $(LINUX_DIR)/net/netfilter/xt_CHECKSUM.ko \ + $(foreach mod,$(IPT_CHECKSUM-m),$(LINUX_DIR)/net/$(mod).ko) + AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_CHECKSUM-m))) + $(call AddDepends/ipt) +endef + +define KernelPackage/ipt-checksum/description + Kernel modules for CHECKSUM fillin target +endef + +$(eval $(call KernelPackage,ipt-checksum)) + define KernelPackage/ipt-iprange TITLE:=Module for matching ip ranges diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile index 89f4354..817f094 100644 --- a/package/network/utils/iptables/Makefile +++ b/package/network/utils/iptables/Makefile @@ -381,6 +381,15 @@ U32 iptables extensions. endef +define Package/iptables-mod-checksum +$(call Package/iptables/Module, +kmod-ipt-checksum) + TITLE:=IP CHECKSUM target extension +endef + +define Package/iptables-mod-checksum/description +iptables extension for the CHECKSUM calculation target +endef + define Package/ip6tables $(call Package/iptables/Default) DEPENDS:=@IPV6 +kmod-ip6tables +iptables @@ -585,6 +594,7 @@ $(eval $(call BuildPlugin,iptables-mod-tee,$(IPT_TEE-m))) $(eval $(call BuildPlugin,iptables-mod-u32,$(IPT_U32-m))) $(eval $(call BuildPlugin,iptables-mod-nflog,$(IPT_NFLOG-m))) $(eval $(call BuildPlugin,iptables-mod-nfqueue,$(IPT_NFQUEUE-m))) +$(eval $(call BuildPlugin,iptables-mod-checksum,$(IPT_CHECKSUM-m))) $(eval $(call BuildPackage,ip6tables)) $(eval $(call BuildPlugin,ip6tables-extra,$(IPT_IPV6_EXTRA-m))) $(eval $(call BuildPlugin,ip6tables-mod-nat,$(IPT_NAT6-m))) From patchwork Sun Oct 22 20:21:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829085 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrZY3bVWz9sRm for ; Mon, 23 Oct 2017 07:23:17 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 691DFB91583; Sun, 22 Oct 2017 22:21:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:21:55 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 9ADA5B8057E for ; Sun, 22 Oct 2017 22:21:32 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006iy-HR from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:24 +0200 Message-Id: <1508703687-25650-7-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 6/9] ar71xx: add support for Anonabox Pro X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: August Germar Chipset is a 650mhz Atheros with 128mb ram. Variation of QCA9531 SoC with two Ethernet ports and a 802.11n 2.4 GHz radio. Signed-off-by: August Germar [with review by Daniel Engberg] Reviewed-by: Zoltan HERPAI --- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.9 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 11 +++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../files/arch/mips/ath79/mach-anonabox-pro.c | 110 +++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/legacy-devices.mk | 6 ++ target/linux/ar71xx/image/legacy.mk | 2 + 9 files changed, 136 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-anonabox-pro.c diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index f89c009..bdba81b 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -687,6 +687,9 @@ ar71xx_board_detect() { *"HiWiFi HC6361") name="hiwifi-hc6361" ;; + *"ANONABOX_PRO") + name="anonabox-pro" + ;; *"Hornet-UB") local size="$(mtd_get_part_size 'firmware')" diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 3d6d9ed..a60e44c 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -310,6 +310,7 @@ platform_check_image() { ;; alfa-ap96|\ alfa-nx|\ + anonabox-pro|\ ap121-mini|\ ap121|\ ap135-020|\ diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 index 84b2a0b..285c638 100644 --- a/target/linux/ar71xx/config-4.9 +++ b/target/linux/ar71xx/config-4.9 @@ -36,6 +36,7 @@ CONFIG_ATH79_MACH_ALFA_AP96=y CONFIG_ATH79_MACH_ALFA_NX=y CONFIG_ATH79_MACH_ALL0258N=y CONFIG_ATH79_MACH_ALL0315N=y +CONFIG_ATH79_MACH_ANONABOX_PRO=y CONFIG_ATH79_MACH_ANTMINER_S1=y CONFIG_ATH79_MACH_ANTMINER_S3=y CONFIG_ATH79_MACH_ANTROUTER_R1=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 5cb4f7e..ac77aed 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -124,6 +124,17 @@ config ATH79_MACH_ALL0315N select ATH79_DEV_LEDS_GPIO select ATH79_DEV_M25P80 +config ATH79_MACH_ANONABOX_PRO + bool "Anonabox Pro board" + select SOC_QCA953X + select ATH79_DEV_GPIO_BUTTONS + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_SPI + select ATH79_DEV_USB + select ATH79_DEV_WMAC + select ATH79_DEV_ETH + select ATH79_DEV_M25P80 + config ATH79_MACH_ANTMINER_S1 bool "Bitmain Antminer S1 support" select SOC_AR933X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index 7d12282..e6f0cae 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -45,6 +45,7 @@ obj-$(CONFIG_ATH79_MACH_ALFA_AP96) += mach-alfa-ap96.o obj-$(CONFIG_ATH79_MACH_ALFA_NX) += mach-alfa-nx.o obj-$(CONFIG_ATH79_MACH_ALL0258N) += mach-all0258n.o obj-$(CONFIG_ATH79_MACH_ALL0315N) += mach-all0315n.o +obj-$(CONFIG_ATH79_MACH_ANONABOX_PRO) += mach-anonabox-pro.o obj-$(CONFIG_ATH79_MACH_ANTMINER_S1) += mach-antminer-s1.o obj-$(CONFIG_ATH79_MACH_ANTMINER_S3) += mach-antminer-s3.o obj-$(CONFIG_ATH79_MACH_ANTROUTER_R1) += mach-antrouter-r1.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-anonabox-pro.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-anonabox-pro.c new file mode 100644 index 0000000..3fc4c39 --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-anonabox-pro.c @@ -0,0 +1,110 @@ +/* + * AnonaBox QCA9531 board support + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include + +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-gpio-buttons.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-spi.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +#define ANONABOX_PRO_GPIO_LED_STATUS 14 + +#define ANONABOX_PRO_GPIO_BTN_RST 17 + +#define ANONABOX_PRO_KEYS_POLL_INTERVAL 20 /* msecs */ +#define ANONABOX_PRO_KEYS_DEBOUNCE_INTERVAL (3 * ANONABOX_PRO_KEYS_POLL_INTERVAL) + +#define ANONABOX_PRO_MAC0_OFFSET 0 +#define ANONABOX_PRO_MAC1_OFFSET 6 +#define ANONABOX_PRO_WMAC_CALDATA_OFFSET 0x1000 + +static struct gpio_led anonabox_pro_leds_gpio[] __initdata = { + { + .name = "anonabox_pro:green:status", + .gpio = ANONABOX_PRO_GPIO_LED_STATUS, + .active_low = 1, + }, +}; + +static struct gpio_keys_button anonabox_pro_gpio_keys[] __initdata = { + { + .desc = "reset button", + .type = EV_KEY, + .code = KEY_RESTART, + .debounce_interval = ANONABOX_PRO_KEYS_DEBOUNCE_INTERVAL, + .gpio = ANONABOX_PRO_GPIO_BTN_RST, + .active_low = 1, + }, +}; + +static void __init anonabox_pro_gpio_led_setup(void) +{ + ath79_register_leds_gpio(-1, ARRAY_SIZE(anonabox_pro_leds_gpio), + anonabox_pro_leds_gpio); + ath79_register_gpio_keys_polled(-1, ANONABOX_PRO_KEYS_POLL_INTERVAL, + ARRAY_SIZE(anonabox_pro_gpio_keys), + anonabox_pro_gpio_keys); +} + +static void __init anonabox_pro_setup(void) +{ + u8 *art = (u8 *) KSEG1ADDR(0x1fff0000); + + ath79_register_m25p80(NULL); + + anonabox_pro_gpio_led_setup(); + + ath79_register_usb(); + + ath79_register_wmac(art + ANONABOX_PRO_WMAC_CALDATA_OFFSET, NULL); + + ath79_register_mdio(0, 0x0); + ath79_register_mdio(1, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, art + ANONABOX_PRO_MAC0_OFFSET, 0); + ath79_init_mac(ath79_eth1_data.mac_addr, art + ANONABOX_PRO_MAC1_OFFSET, 0); + + /* WAN port */ + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.phy_mask = BIT(4); + ath79_register_eth(0); + + /* LAN ports */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.speed = SPEED_1000; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_switch_data.phy_poll_mask |= BIT(4); + ath79_switch_data.phy4_mii_en = 1; + ath79_register_eth(1); +} + +MIPS_MACHINE(ATH79_MACH_ANONABOX_PRO, "ANONABOX_PRO", "Anonabox QCA9531", + anonabox_pro_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index 01472b6..bdf0167 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -26,6 +26,7 @@ enum ath79_mach_type { ATH79_MACH_ALL0258N, /* Allnet ALL0258N */ ATH79_MACH_ALL0305, /* Allnet ALL0305 */ ATH79_MACH_ALL0315N, /* Allnet ALL0315N */ + ATH79_MACH_ANONABOX_PRO, /* AnonaBox Pro */ ATH79_MACH_ANTMINER_S1, /* Antminer S1 */ ATH79_MACH_ANTMINER_S3, /* Antminer S3 */ ATH79_MACH_ANTROUTER_R1, /* Antrouter R1 */ diff --git a/target/linux/ar71xx/image/legacy-devices.mk b/target/linux/ar71xx/image/legacy-devices.mk index e418282..0bbadc0 100644 --- a/target/linux/ar71xx/image/legacy-devices.mk +++ b/target/linux/ar71xx/image/legacy-devices.mk @@ -55,6 +55,12 @@ define LegacyDevice/ALL0315N endef LEGACY_DEVICES += ALL0315N +define LegacyDevice/ANONABOX_PRO + DEVICE_TITLE := AnonaBox Pro board + DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-ledtrig-usbdev +endef +LEGACY_DEVICES += ANONABOX_PRO + define LegacyDevice/AP121_8M DEVICE_TITLE := Atheros AP121 reference board (8MB flash) DEVICE_PACKAGES := kmod-usb-core kmod-usb2 diff --git a/target/linux/ar71xx/image/legacy.mk b/target/linux/ar71xx/image/legacy.mk index 701116b..62d261e 100644 --- a/target/linux/ar71xx/image/legacy.mk +++ b/target/linux/ar71xx/image/legacy.mk @@ -227,6 +227,7 @@ alfa_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs) alfa_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,15936k(firmware),64k(nvram),64k(art)ro all0258n_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),6272k(firmware),1536k(failsafe),64k(art)ro all0315n_mtdlayout=mtdparts=spi0.0:256k(u-boot)ro,256k(u-boot-env),13568k(firmware),2048k(failsafe),256k(art)ro +anonabox_pro_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware) ap96_mtdlayout=mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1728k(kernel),64k(art)ro,7872k@0x40000(firmware) ap121_mtdlayout_8M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,6144k(rootfs),1600k(kernel),64k(nvram),64k(art)ro,7744k@0x50000(firmware) ap121_mtdlayout_16M=mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,10944k(rootfs),4992k(kernel),64k(nvram),64k(art)ro,15936k@0x50000(firmware) @@ -882,6 +883,7 @@ $(eval $(call SingleProfile,AthLzma,64k,ALFAAP120C,alfa-ap120c,ALFA-AP120C,ttyS0 $(eval $(call SingleProfile,AthLzma,64k,ALFAAP96,alfa-ap96,ALFA-AP96,ttyS0,115200,$$(alfa_ap96_mtdlayout),RKuImage)) $(eval $(call SingleProfile,AthLzma,64k,ALL0258N,all0258n,ALL0258N,ttyS0,115200,$$(all0258n_mtdlayout),KRuImage,65536)) $(eval $(call SingleProfile,AthLzma,256k,ALL0315N,all0315n,ALL0315N,ttyS0,115200,$$(all0315n_mtdlayout),KRuImage,262144)) +$(eval $(call SingleProfile,AthLzma,64k,ANONABOX_PRO,anonabox-pro-16M,ANONABOX_PRO,ttyS0,115200,$$(anonabox_pro_mtdlayout_16M),RKuImage)) $(eval $(call SingleProfile,AthLzma,64k,AP121_8M,ap121-8M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_8M),RKuImage)) $(eval $(call SingleProfile,AthLzma,64k,AP121_16M,ap121-16M,AP121,ttyATH0,115200,$$(ap121_mtdlayout_16M),RKuImage)) $(eval $(call SingleProfile,AthLzma,64k,AP132,ap132,AP132,ttyS0,115200,$$(ap132_mtdlayout),KRuImage)) From patchwork Sun Oct 22 20:21:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829073 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrXj0y4hz9sRV for ; Mon, 23 Oct 2017 07:21:39 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 7DC16B80607; Sun, 22 Oct 2017 22:21:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:21:33 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A7F22B8057E for ; Sun, 22 Oct 2017 22:21:31 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006jK-I4 from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:25 +0200 Message-Id: <1508703687-25650-8-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 7/9] sunxi: Added profile for HAOYU Electronics Marsboard A10 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" From: Kayo Phoenix The MarsBoard was a short-lived credit-card sized, extendable board with an Allwinner A10 SoC. http://linux-sunxi.org/MarsBoard_A10 Signed-off-by: Kayo Phoenix [Forward-ported to new target layout:] Signed-off-by: Zoltan HERPAI --- package/boot/uboot-sunxi/Makefile | 6 ++++++ target/linux/sunxi/image/cortex-a8.mk | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/package/boot/uboot-sunxi/Makefile b/package/boot/uboot-sunxi/Makefile index 50c6b06..d986f62 100644 --- a/package/boot/uboot-sunxi/Makefile +++ b/package/boot/uboot-sunxi/Makefile @@ -96,6 +96,12 @@ define U-Boot/Hummingbird_A31 NAME:=Hummingbird A31 board endef +define U-Boot/Marsboard + BUILD_SUBTARGET:=cortexa8 + NAME:=Marsboard + BUILD_DEVICES:=sun4i-a10-marsboard +endef + define U-Boot/Mele_M9 BUILD_SUBTARGET:=cortexa7 NAME:=Mele M9 (A31) diff --git a/target/linux/sunxi/image/cortex-a8.mk b/target/linux/sunxi/image/cortex-a8.mk index 97e033d..564a66f 100644 --- a/target/linux/sunxi/image/cortex-a8.mk +++ b/target/linux/sunxi/image/cortex-a8.mk @@ -56,4 +56,14 @@ endef TARGET_DEVICES += sun4i-a10-pcduino + +define Device/sun4i-a10-marsboard + DEVICE_TITLE:=HAOYU Electronics Marsboard A10 + DEVICE_PACKAGES:=mod-ata-core kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi sound-soc-sunxi + SUPPORTED_DEVICES:=marsboard,a10-marsboard + SUNXI_DTS:=sun4i-a10-marsboard +endef + +TARGET_DEVICES += sun4i-a10-marsboard + endif From patchwork Sun Oct 22 20:21:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829074 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrY11Ktmz9sRV for ; Mon, 23 Oct 2017 07:21:57 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 0D5E6B80BB2; Sun, 22 Oct 2017 22:21:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:21:37 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id A2A03B800BD for ; Sun, 22 Oct 2017 22:21:31 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006jo-Ie from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:26 +0200 Message-Id: <1508703687-25650-9-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 8/9] ramips: add Devolo WiFi Repeater (mt2681) X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" This is pretty much the same as the ALL0256N-8M but with different LED settings. Based on Matt Jenkins' patch, with additional reworks. https://github.com/openwrt/openwrt/pull/491 Signed-off-by: Zoltan HERPAI --- target/linux/ramips/base-files/etc/board.d/01_leds | 7 ++ .../linux/ramips/base-files/etc/board.d/02_network | 1 + target/linux/ramips/base-files/lib/ramips.sh | 3 + .../ramips/base-files/lib/upgrade/platform.sh | 1 + target/linux/ramips/dts/MT2681.dts | 106 +++++++++++++++++++++ target/linux/ramips/image/rt305x.mk | 7 ++ 6 files changed, 125 insertions(+) create mode 100644 target/linux/ramips/dts/MT2681.dts diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 75ab0da..525c32b 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -55,6 +55,13 @@ air3gii) set_wifi_led "$board:green:wlan" set_usb_led "$board:green:mobile" ;; +mt2681) + ucidef_set_rssimon "wlan0" "40000" "1" + ucidef_set_led_rssi "rssilow" "RSSILOW" "$board:green:rssilow" "wlan0" "1" "40" "0" "6" + ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "$board:green:rssimed" "wlan0" "30" "80" "-29" "5" + ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$board:green:rssihigh" "wlan0" "70" "100" "-69" "8" + set_wifi_led "rt2800pci-phy0::radio" + ;; all0256n-4M|\ all0256n-8M) ucidef_set_rssimon "wlan0" "200000" "1" diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 1c8505e..101c97e 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -53,6 +53,7 @@ ramips_setup_interfaces() m2m|\ microwrt|\ mpr-a2|\ + mt2681|\ ncs601w|\ omega2 | \ omega2p | \ diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 07e776c..e451b0e 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -331,6 +331,9 @@ ramips_board_detect() { *"MR200") name="mr200" ;; + *"MT2681") + name="mt2681" + ;; *"MT7620a + MT7530 evaluation"*) name="mt7620a_mt7530" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 99ebe35..5430be7 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -98,6 +98,7 @@ platform_check_image() { mpr-a1|\ mpr-a2|\ mr-102n|\ + mt2681|\ mt7628|\ mzk-750dhp|\ mzk-dp150n|\ diff --git a/target/linux/ramips/dts/MT2681.dts b/target/linux/ramips/dts/MT2681.dts new file mode 100644 index 0000000..634e8c8 --- /dev/null +++ b/target/linux/ramips/dts/MT2681.dts @@ -0,0 +1,106 @@ +/dts-v1/; + +#include "rt3050.dtsi" + +/ { + compatible = "ralink,rt3050-soc"; + model = "Devolo WiFi Extender MT2681"; + + gpio-leds { + compatible = "gpio-leds"; + + rssilow { + label = "mt2681:green:rssilow"; + gpios = <&gpio0 7 1>; + }; + + rssimed { + label = "mt2681:green:rssimed"; + gpios = <&gpio0 11 1>; + }; + + rssihigh { + label = "mt2681:green:rssihigh"; + gpios = <&gpio0 12 1>; + }; + + wifi { + label = "mt2681:red:wifi"; + gpios = <&gpio0 9 1>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 10 1>; + linux,code = <0x198>; + }; + }; +}; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "jedec,spi-nor"; + reg = <0>; + linux,modalias = "m25p80", "mx25l3205d"; + spi-max-frequency = <10000000>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "rgmii", "mdio", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3f>; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; \ No newline at end of file diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 4e82eb4..d7093fb 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -485,6 +485,13 @@ define Device/mpr-a2 endef TARGET_DEVICES += mpr-a2 +define Device/mt2681 + DTS := MT2681 + DEVICE_TITLE := Devolo WiFi Extender MT2681 + DEVICE_PACKAGES := rssileds +endef +TARGET_DEVICES += mt2681 + define Device/mr-102n DTS := MR-102N DEVICE_TITLE := AXIMCom MR-102N From patchwork Sun Oct 22 20:21:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan HERPAI X-Patchwork-Id: 829087 X-Patchwork-Delegate: blogic@openwrt.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (helo) smtp.helo=arrakis.dune.hu (client-ip=78.24.191.176; helo=arrakis.dune.hu; envelope-from=openwrt-devel-bounces@lists.openwrt.org; receiver=) Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yKrZr2sqvz9sRg for ; Mon, 23 Oct 2017 07:23:32 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 29973B9158B; Sun, 22 Oct 2017 22:22:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Sun, 22 Oct 2017 22:22:00 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 061F4B80607 for ; Sun, 22 Oct 2017 22:21:33 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_FROM_IP=-2 (check from: .uid0. - helo: .trabant.uid0. - helo-domain: .uid0.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from trabant.uid0.hu (trabant.uid0.hu [81.0.124.200]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sun, 22 Oct 2017 22:21:28 +0200 (CEST) Received: from wigyori by trabant.uid0.hu with local (Exim 4.84_2 #1 (Debian)) id 1e6MkR-0006kD-JD from ; Sun, 22 Oct 2017 22:21:27 +0200 From: Zoltan HERPAI To: lede-dev@lists.infradead.org Date: Sun, 22 Oct 2017 22:21:27 +0200 Message-Id: <1508703687-25650-10-git-send-email-wigyori@uid0.hu> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> References: <1508703687-25650-1-git-send-email-wigyori@uid0.hu> Subject: [OpenWrt-Devel] [PATCH 9/9] ar71xx: add support for Comfast E214N V2 Outdoor CPE X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: hauke@hauke-m.de, openwrt-devel@lists.openwrt.org MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Based on Robert Budde's patch, with additional reworks. https://github.com/openwrt/openwrt/pull/390 Signed-off-by: Zoltan HERPAI --- target/linux/ar71xx/base-files/etc/board.d/01_leds | 10 ++ target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 + .../ar71xx/base-files/lib/upgrade/platform.sh | 1 + target/linux/ar71xx/config-4.4 | 1 + target/linux/ar71xx/config-4.9 | 1 + .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt | 8 ++ target/linux/ar71xx/files/arch/mips/ath79/Makefile | 1 + .../files/arch/mips/ath79/mach-cf-e214n-v2.c | 124 +++++++++++++++++++++ .../linux/ar71xx/files/arch/mips/ath79/machtypes.h | 1 + target/linux/ar71xx/image/generic.mk | 8 ++ 10 files changed, 158 insertions(+) create mode 100644 target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e214n-v2.c diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds b/target/linux/ar71xx/base-files/etc/board.d/01_leds index 27e6c8a..5707624 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -182,6 +182,16 @@ carambola2) ucidef_set_led_netdev "wan" "WAN" "$board:orange:eth1" "eth1" ucidef_set_led_wlan "wlan" "WLAN" "$board:green:wlan" "phy0tpt" ;; +cf-e214n-v2) + ucidef_set_led_netdev "lan" "LAN" "$board:lan" "eth0" + ucidef_set_led_netdev "wan" "WAN" "$board:wan" "eth1" + ucidef_set_led_wlan "wlan" "WLAN" "$board:wlan" "phy0tpt" + ucidef_set_rssimon "wlan" "200000" "1" + ucidef_set_led_rssi "rssilow" "RSSILOW" "$board:link1" "wlan" "1" "100" "0" "13" + ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "$board:link2" "wlan" "26" "100" "-25" "13" + ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "$board:link3" "wlan" "51" "100" "-50" "13" + ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "$board:link4" "wlan" "76" "100" "-75" "13" + ;; cf-e316n-v2) ucidef_set_led_netdev "lan" "LAN" "$board:blue:lan" "eth0" ucidef_set_led_netdev "wan" "WAN" "$board:blue:wan" "eth1" diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index bdba81b..1c1317d 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -504,6 +504,9 @@ ar71xx_board_detect() { *"Carambola2"*) name="carambola2" ;; + *"CF-E214N v2") + name="cf-e214n-v2" + ;; *"CF-E316N v2") name="cf-e316n-v2" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index a60e44c..e768386 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -215,6 +215,7 @@ platform_check_image() { bullet-m|\ c-55|\ carambola2|\ + cf-e214n-v2|\ cf-e316n-v2|\ cf-e320n-v2|\ cf-e355ac|\ diff --git a/target/linux/ar71xx/config-4.4 b/target/linux/ar71xx/config-4.4 index 4793bf4..d8f94e3 100644 --- a/target/linux/ar71xx/config-4.4 +++ b/target/linux/ar71xx/config-4.4 @@ -67,6 +67,7 @@ CONFIG_ATH79_MACH_C55=y CONFIG_ATH79_MACH_CAP324=y CONFIG_ATH79_MACH_CAP4200AG=y CONFIG_ATH79_MACH_CARAMBOLA2=y +CONFIG_ATH79_MACH_CF_E214N_V2=y CONFIG_ATH79_MACH_CF_E316N_V2=y CONFIG_ATH79_MACH_CF_E320N_V2=y CONFIG_ATH79_MACH_CF_E355AC=y diff --git a/target/linux/ar71xx/config-4.9 b/target/linux/ar71xx/config-4.9 index 285c638..df90b20 100644 --- a/target/linux/ar71xx/config-4.9 +++ b/target/linux/ar71xx/config-4.9 @@ -66,6 +66,7 @@ CONFIG_ATH79_MACH_C55=y CONFIG_ATH79_MACH_CAP324=y CONFIG_ATH79_MACH_CAP4200AG=y CONFIG_ATH79_MACH_CARAMBOLA2=y +CONFIG_ATH79_MACH_CF_E214N_V2=y CONFIG_ATH79_MACH_CF_E316N_V2=y CONFIG_ATH79_MACH_CF_E320N_V2=y CONFIG_ATH79_MACH_CF_E355AC=y diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index ac77aed..a382f90 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -2032,6 +2032,14 @@ config ATH79_MACH_RAMBUTAN select ATH79_DEV_USB select ATH79_DEV_WMAC +config ATH79_MACH_CF_E214N_V2 + bool "COMFAST CF-E214N v2 board" + select SOC_QCA953X + select ATH79_DEV_ETH + select ATH79_DEV_LEDS_GPIO + select ATH79_DEV_M25P80 + select ATH79_DEV_WMAC + config ATH79_MACH_CF_E316N_V2 bool "COMFAST CF-E316N v2 support" select SOC_AR934X diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Makefile b/target/linux/ar71xx/files/arch/mips/ath79/Makefile index e6f0cae..985734f 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Makefile +++ b/target/linux/ar71xx/files/arch/mips/ath79/Makefile @@ -75,6 +75,7 @@ obj-$(CONFIG_ATH79_MACH_C60) += mach-c60.o obj-$(CONFIG_ATH79_MACH_CAP324) += mach-cap324.o obj-$(CONFIG_ATH79_MACH_CAP4200AG) += mach-cap4200ag.o obj-$(CONFIG_ATH79_MACH_CARAMBOLA2) += mach-carambola2.o +obj-$(CONFIG_ATH79_MACH_CF_E214N_V2) += mach-cf-e214n-v2.o obj-$(CONFIG_ATH79_MACH_CF_E316N_V2) += mach-cf-e316n-v2.o obj-$(CONFIG_ATH79_MACH_CF_E320N_V2) += mach-cf-e316n-v2.o obj-$(CONFIG_ATH79_MACH_CF_E355AC) += mach-cf-e316n-v2.o diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e214n-v2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e214n-v2.c new file mode 100644 index 0000000..f2f51be --- /dev/null +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-cf-e214n-v2.c @@ -0,0 +1,124 @@ +/* + * COMFAST CF-E214N v2 + * by Shenzhen Four Seas Global Link Network Technology Co., Ltd + * + * aka CF-E214V2, CF-E214N-V2 and CF-E214Nv2.0 (no FCC ID) + * + * Copyright (C) 2017 Robert Budde + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published + * by the Free Software Foundation. + */ + +#include +#include +#include + +#include +#include + +#include "common.h" +#include "dev-eth.h" +#include "dev-leds-gpio.h" +#include "dev-m25p80.h" +#include "dev-usb.h" +#include "dev-wmac.h" +#include "machtypes.h" + +static struct gpio_led cf_e214n_v2_leds_gpio[] __initdata = { + { + .name = "cf-e214n-v2:wlan", + .gpio = 0, + .active_low = 1, + }, { + .name = "cf-e214n-v2:lan", + .gpio = 2, + .active_low = 1, + }, { + .name = "cf-e214n-v2:wan", + .gpio = 3, + .active_low = 1, + }, { + .name = "cf-e214n-v2:link1", + .gpio = 11, + .active_low = 1, + }, { + .name = "cf-e214n-v2:link2", + .gpio = 12, + .active_low = 1, + }, { + .name = "cf-e214n-v2:link3", + .gpio = 14, + .active_low = 1, + }, { + .name = "cf-e214n-v2:link4", + .gpio = 16, + .active_low = 1, + }, +}; + +/* There's a Pericon Technology PT7A7514 connected to GPIO 13 */ +#define EXT_WATCHDOG_GPIO 13 +static struct timer_list gpio_wdt_timer; + +static void gpio_wdt_toggle(unsigned long period) +{ + static int state; + state = !state; + gpio_set_value(EXT_WATCHDOG_GPIO, state); + mod_timer(&gpio_wdt_timer, jiffies + period); +} + +static void __init cf_e214n_v2_setup(void) +{ + u8 *maclan = (u8 *) KSEG1ADDR(0x1f010000); + u8 *macwlan = (u8 *) KSEG1ADDR(0x1f011002); + u8 *ee = (u8 *) KSEG1ADDR(0x1f011000); + u8 tmpmac[ETH_ALEN]; + + int i; + + for (i = 0; i < ARRAY_SIZE(cf_e214n_v2_leds_gpio); i++) + ath79_gpio_output_select(cf_e214n_v2_leds_gpio[i].gpio, + AR934X_GPIO_OUT_GPIO); + + gpio_request(EXT_WATCHDOG_GPIO, "PT7A7514 watchdog"); + gpio_direction_output(EXT_WATCHDOG_GPIO, 0); + setup_timer(&gpio_wdt_timer, gpio_wdt_toggle, msecs_to_jiffies(500)); + gpio_wdt_toggle(msecs_to_jiffies(1)); + + ath79_register_m25p80(NULL); + + ath79_register_mdio(0, 0x0); + ath79_register_mdio(1, 0x0); + + ath79_init_mac(ath79_eth0_data.mac_addr, maclan, 0); + ath79_init_mac(ath79_eth1_data.mac_addr, maclan, 1); + + /* "LAN" - GMAC0 is connected to the PHY4 of the internal switch */ + ath79_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII; + ath79_eth0_data.speed = SPEED_100; + ath79_eth0_data.duplex = DUPLEX_FULL; + ath79_eth0_data.phy_mask = BIT(4); + ath79_register_eth(0); + + /* "WAN" - GMAC1 is connected to the internal switch */ + ath79_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_GMII; + ath79_eth1_data.speed = SPEED_1000; + ath79_eth1_data.duplex = DUPLEX_FULL; + ath79_switch_data.phy_poll_mask |= BIT(4); + ath79_switch_data.phy4_mii_en = 1; + ath79_register_eth(1); + + ath79_init_mac(tmpmac, macwlan, 0); + ath79_register_wmac(ee, tmpmac); + + ath79_register_leds_gpio(-1, ARRAY_SIZE(cf_e214n_v2_leds_gpio), + cf_e214n_v2_leds_gpio); + + ath79_register_usb(); +} + +MIPS_MACHINE(ATH79_MACH_CF_E214N_V2, "CF-E214N-V2", "COMFAST CF-E214N v2", + cf_e214n_v2_setup); diff --git a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h index bdf0167..46c9766 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h +++ b/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h @@ -61,6 +61,7 @@ enum ath79_mach_type { ATH79_MACH_CAP324, /* PowerCloud CAP324 */ ATH79_MACH_CAP4200AG, /* Senao CAP4200AG */ ATH79_MACH_CARAMBOLA2, /* 8devices Carambola2 */ + ATH79_MACH_CF_E214N_V2, /* COMFAST CF-E214N v2 */ ATH79_MACH_CF_E316N_V2, /* COMFAST CF-E316N v2 */ ATH79_MACH_CF_E320N_V2, /* COMFAST CF-E320N v2 */ ATH79_MACH_CF_E355AC, /* COMFAST CF-E355AC */ diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk index 6f5a701..d91c8f8 100644 --- a/target/linux/ar71xx/image/generic.mk +++ b/target/linux/ar71xx/image/generic.mk @@ -135,6 +135,14 @@ define Device/carambola2 endef TARGET_DEVICES += carambola2 +define Device/cf-e214n-v2 + DEVICE_TITLE := COMFAST CF-E214N v2 + BOARDNAME := CF-E214N-V2 + IMAGE_SIZE := 16192k + MTDPARTS = spi0.0:64k(u-boot)ro,64k(art)ro,16192k(firmware),64k(nvram)ro +endef +TARGET_DEVICES += cf-e214n-v2 + define Device/cf-e316n-v2 DEVICE_TITLE := COMFAST CF-E316N v2 BOARDNAME := CF-E316N-V2