From patchwork Tue Sep 8 08:26:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 1359602 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=q1E2Yfsj; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BlywF42m9z9sTH for ; Tue, 8 Sep 2020 18:28:29 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Hcf56pVJ076tT0kT+pNEZrWt8cvLccaQVWRYw7yZIss=; b=q1E2Yfsj3VzC2Irt7rcflkt6r2 1mzFL4+hRp56iwf0srqdd7T5UCJvnPTLM60u7uQNCOM+Z/oOp4bj/HQMCg7tM/ERJZBJVOryMwSba 0g3E2pWnhU+u02JhQG7aFxS0Qb8v084k9IVQYXhKD7d8uqp3W+mstHJOsX18UcLH83b30QNptN7Fy 5eF74P8MmzH5quH3rJzKDV4Vg1bCYU+Q17PlQHHPWRzC/fmrb46FcVy5UjxszMjsgPZZF+JxNY6bG uhLLIIA+BAcL0YMg8lG5wTi4L3n7iCcgInhLAYZoI5sx765sN9adBTXDT4zSXpHTgW3ObDF+RLvKb MZG9trrQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFYxa-0006Lp-9u; Tue, 08 Sep 2020 08:26:38 +0000 Received: from i7.infradead.org ([2001:8b0:10b:1:21e:67ff:fecb:7a92]) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFYxX-0006LD-57 for openwrt-devel@lists.openwrt.org; Tue, 08 Sep 2020 08:26:35 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.93 #3 (Red Hat Linux)) id 1kFYxW-007zFR-2z for openwrt-devel@lists.openwrt.org; Tue, 08 Sep 2020 09:26:34 +0100 From: David Woodhouse To: openwrt-devel@lists.openwrt.org Subject: [PATCH 1/3] mediatek: mt7623n-preloader: add preloader for Banana Pi R64 Date: Tue, 8 Sep 2020 09:26:32 +0100 Message-Id: <20200908082634.1898371-1-dwmw2@infradead.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org We want to be able to make full system images for this system too, just as we now can for the MT7623 platforms. The package directory (mt7623n) is now a bit misnamed as it's overly specific, but the precise set of platforms which we support this way is evolving and we'll fix it up when the dust settles and we know what nomenclature makes most sense. Signed-off-by: David Woodhouse --- package/boot/mt7623n-preloader/Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/package/boot/mt7623n-preloader/Makefile b/package/boot/mt7623n-preloader/Makefile index 801c6d19b3..0faaf46d3f 100644 --- a/package/boot/mt7623n-preloader/Makefile +++ b/package/boot/mt7623n-preloader/Makefile @@ -30,6 +30,14 @@ define Download/BPI-R2-preloader-2k.img.gz endef $(eval $(call Download,BPI-R2-preloader-2k.img.gz)) +define Download/BPI-R64-preloader-2k.img.gz + FILE:=$(BPI_PRELOADER_PREFIX)-BPI-R64-preloader-2k.img.gz + URL:=$(BPI_PRELOADER_URL) + URL_FILE:=BPI-R64-preloader-2k.img.gz + HASH:=1a4b55da1717190aa4e790ce93850605e9b15aae4c3248bcf8734aac020ab0e4 +endef +$(eval $(call Download,BPI-R64-preloader-2k.img.gz)) + define Package/mt7623n-preloader SECTION:=boot @@ -43,10 +51,23 @@ define Package/mt7623n-preloader/description Preloader image for mt7623n based boards like Banana Pi R2. endef +define Package/mt7622-preloader + SECTION:=boot + CATEGORY:=Boot Loaders + DEPENDS:=@TARGET_mediatek_mt7622 + TITLE:=mt7622-preloader + DEFAULT:=y if TARGET_mediatek +endef + +define Package/mt7622-preloader/description + Preloader image for mt7622 based boards like Banana Pi R64. +endef + define Build/Prepare rm -rf $(PKG_BUILD_DIR) mkdir -p $(PKG_BUILD_DIR) cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R2-preloader-DDR1600-20191024-2k.img.gz $(PKG_BUILD_DIR)/mt7623n_bpir2-preloader.bin.gz + cp $(DL_DIR)/$(BPI_PRELOADER_PREFIX)-BPI-R64-preloader-2k.img.gz $(PKG_BUILD_DIR)/mt7622_bpir64-preloader.bin.gz endef define Build/Compile @@ -59,3 +80,4 @@ define Build/InstallDev endef $(eval $(call BuildPackage,mt7623n-preloader)) +$(eval $(call BuildPackage,mt7622-preloader)) From patchwork Tue Sep 8 08:26:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 1359600 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=ZyKCsQJX; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BlywD0Dl8z9sPB for ; Tue, 8 Sep 2020 18:28:27 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=OL/SnMFJTkofk1a3wr9IXqdduSzha5xAaj7cxnGhelM=; b=ZyKCsQJXQeeSf4tc1AnIvgnxvw dY8DTj4eEe4WJzYFQJz7x4UYTb8uKol8afGUQihnOIpRYChBdv8ZlhuYruf7X/xJiiS0Zse7WzrEb hszTBwoKeTvohKOAi+YrPRjxJZhGly3X/wCOpSqMmJZ87kEoBZgyZXClQb+NjsT9ImwHLWfZhisQk oZLAn5hjJUFhddPeSNGTt2trJFHS26me/CZRVux8nKN83r0b1XjXagF3ZLVQD7RXsdXtYXmfohlyL t9dHoiz29DQlirDsVvw2Wa4914MaZBQJJtKuZhKvsb6Sc4mypxu6tu4LZN7q2O1UIcN7PM5DvUu0V kA8r2Xiw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFYxY-0006Lb-N0; Tue, 08 Sep 2020 08:26:36 +0000 Received: from i7.infradead.org ([2001:8b0:10b:1:21e:67ff:fecb:7a92]) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFYxX-0006LC-4x for openwrt-devel@lists.openwrt.org; Tue, 08 Sep 2020 08:26:35 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.93 #3 (Red Hat Linux)) id 1kFYxW-007zGc-45 for openwrt-devel@lists.openwrt.org; Tue, 08 Sep 2020 09:26:34 +0100 From: David Woodhouse To: openwrt-devel@lists.openwrt.org Subject: [PATCH 2/3] mediatek: fix missing pause on switch port for Banana Pi R2 Date: Tue, 8 Sep 2020 09:26:33 +0100 Message-Id: <20200908082634.1898371-2-dwmw2@infradead.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908082634.1898371-1-dwmw2@infradead.org> References: <20200908082634.1898371-1-dwmw2@infradead.org> MIME-Version: 1.0 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This causes rx drops when running iperf. Signed-off-by: David Woodhouse --- ...623-add-missing-pause-for-switchport.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 target/linux/mediatek/patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch diff --git a/target/linux/mediatek/patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch b/target/linux/mediatek/patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch new file mode 100644 index 0000000000..35277f0ddd --- /dev/null +++ b/target/linux/mediatek/patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch @@ -0,0 +1,27 @@ +From: Frank Wunderlich +Date: Mon, 7 Sep 2020 09:05:17 +0200 + +port6 of mt7530 switch (= cpu port 0) on bananapi-r2 misses pause option +which causes rx drops on running iperf. + +Cc: stable@vger.kernel.org +Fixes: f4ff257cd160 ("arm: dts: mt7623: add support for Bananapi R2 (BPI-R2) board") +Signed-off-by: Frank Wunderlich +--- + arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +index 2b760f90f38c..5375c6699843 100644 +--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts ++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +@@ -192,6 +192,7 @@ port@6 { + fixed-link { + speed = <1000>; + full-duplex; ++ pause; + }; + }; + }; +-- +2.25.1 From patchwork Tue Sep 8 08:26:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 1359601 X-Patchwork-Delegate: daniel@makrotopia.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=i1Z8jS9J; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BlywD57ctz9sSJ for ; Tue, 8 Sep 2020 18:28:28 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=t6nnhdLNJ8S7j6yq8O7lJdagKpq3tUMp0zD7/nzi7i4=; b=i1Z8jS9JzLGuoc+bX27q/poRmC /uxxPDRwePd1+LS4Jkc9LFMpOiUYiKQTE2BhWnR7rvuajlggIh3TFc7yHKVgC1jv1VvKM2Tg7ACZp CepZQkxK8KcsXqqrk4LNK+AD3hoZEcB8R6WVTOLBpUnz7Mx4LrdH60lPEAygaxnqX5ejGOebd4Ljh CSuZEOzkMrBbB7gmPWSLlEHGwurE6J3SRl5qUfPOOKUQ1GPStRpttdPOVcayU8a6tvSCFKzYWqNmj DPJ2ufo4RaAya8SfDT90uh1IHzsWqoY1WQQa63rslgDzGWZ2OUvOaeEIvc/e1WkjXrjxowASRLVIi KTVlfHow==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFYxb-0006MC-Kp; Tue, 08 Sep 2020 08:26:39 +0000 Received: from i7.infradead.org ([2001:8b0:10b:1:21e:67ff:fecb:7a92]) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFYxX-0006LF-6s for openwrt-devel@lists.openwrt.org; Tue, 08 Sep 2020 08:26:35 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.93 #3 (Red Hat Linux)) id 1kFYxW-007zHg-5g for openwrt-devel@lists.openwrt.org; Tue, 08 Sep 2020 09:26:34 +0100 From: David Woodhouse To: openwrt-devel@lists.openwrt.org Subject: [PATCH 3/3] mediatek: mt7623: use bash for generating bootable images Date: Tue, 8 Sep 2020 09:26:34 +0100 Message-Id: <20200908082634.1898371-3-dwmw2@infradead.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200908082634.1898371-1-dwmw2@infradead.org> References: <20200908082634.1898371-1-dwmw2@infradead.org> MIME-Version: 1.0 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org It turns out that 'echo -e' isn't portable; it doesn't work in the dash builtin echo and Ubuntu users are complaining. I can't even get octal (specified by POSIX) to work consistently because those variants of 'echo' which *do* support -e don't seem to interpret octalwithout it. I could switch to /bin/echo but using -e with that isn't actually portable *either* even though it works today. For now just stick with bash, and use its builtin. We may end up using something else entirely; perhaps perl. Signed-off-by: David Woodhouse --- target/linux/mediatek/image/gen_mtk_mmc_img.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/mediatek/image/gen_mtk_mmc_img.sh b/target/linux/mediatek/image/gen_mtk_mmc_img.sh index ea8a9c63a1..2dacb9019d 100755 --- a/target/linux/mediatek/image/gen_mtk_mmc_img.sh +++ b/target/linux/mediatek/image/gen_mtk_mmc_img.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Copyright © 2019 Alexey Loukianov # Copyright © 2020 David Woodhouse