From patchwork Sat May 11 17:37:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1098436 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nTsdZQOl"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="sv7gS0ao"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 451Z6q2X77z9s3Z for ; Sun, 12 May 2019 03:38:11 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date: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=YLwacXNvLrMEKQPEOmJ+doiAxwZpuGZKxSObgq4xBx8=; b=nTsdZQOlQq2y4lmJi9ghRU6aGo y2VqDBEtOV1/thMZ1bfs0g88B4RlwYQ+81ppRsdrjXeN6CfJRdOSyWw3GsLxqg0JOwtFpvCHJoSQX KB4fC66s0VNn0MfaTM14ZF1UrlcTS4Q6OJNOQRDwvVL4uiVnOzJLEdhtdcjw+0s5/bMDXnrJ6HalX ohWCXShiWG8BAteZmDe0vE/8moPg80Zbs4Tz3YPSjlR49k9O7Hhgsmj+IhdwoGP4Eb681kPlaArAc Q47nHFJPnwFq+G586lDpserMP3NnM8fhhFJTkVgQbdjELOOPux5g2BmiS7/LguANTuKkrIBoxdW5g K9cztp+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwX-0005rE-8G; Sat, 11 May 2019 17:37:53 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwT-0005pG-5v for openwrt-devel@lists.openwrt.org; Sat, 11 May 2019 17:37:51 +0000 Received: (wp-smtpd smtp.tlen.pl 12814 invoked from network); 11 May 2019 19:37:44 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557596264; bh=GadcbN/eumP9iuPdj9Lt74HTBDYHIaVMTSh4QFX/01E=; h=From:To:Subject; b=sv7gS0aoW7o5oW4jp+JHfFLuygZTf0pHEhRYdGt79FcJEbdvjL+GFH8eeOUdKvQB2 0npduHegnE8yXq76R1PjoWiHWDwll1+UyV6iMwiv198H7ZH3VJ1XDYxyEZBbe0GuUN apeaxfs8DJDJKxhGKh36c2MNvVDguBq2VYlxFKTM= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 May 2019 19:37:44 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 11 May 2019 19:37:28 +0200 Message-Id: <20190511173735.5549-2-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190511173735.5549-1-tomek_n@o2.pl> References: <20190511173735.5549-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 1efa14760b31bf2dc2198b6c6ac306dc X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [8aP0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_103749_546731_6D30ED8D X-CRM114-Status: UNSURE ( 7.16 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v3 1/8] mvebu: remove unnecessary code building dtbs X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 Even if dts is not included in upstream Makefile, it is built anyway by recipe specified in include/image.mk. Also remove Build/dtb, it's not used since 3f72f3a ("mvebu: clearfog: include DTB for all variants in image"). Signed-off-by: Tomasz Maciej Nowak --- target/linux/mvebu/image/Makefile | 10 +++------- .../linux/mvebu/patches-4.14/105-build_new_dtbs.patch | 10 ---------- 2 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 target/linux/mvebu/patches-4.14/105-build_new_dtbs.patch diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 88790777d9..72b14e344b 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -15,10 +15,6 @@ KERNEL_LOADADDR := 0x00008000 SIGNATURE:=$(shell printf "%.8s" $(SOURCE_DATE_EPOCH)) -define Build/dtb - $(call Image/BuildDTB,$(DTS_DIR)/$(DEVICE_DTS).dts,$@.dtb) -endef - define Build/boot-scr rm -f $@-boot.scr sed -e 's#@ROOT@#$(SIGNATURE)#g' \ @@ -29,7 +25,7 @@ endef define Build/boot-img rm -f $@.boot mkfs.fat -C $@.boot $$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 )) - $(foreach dts,$(DEVICE_DTS), mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb ::$(dts).dtb;) + $(foreach dts,$(DEVICE_DTS), mcopy -i $@.boot $(KDIR)/image-$(dts).dtb ::$(dts).dtb;) mcopy -i $@.boot $(IMAGE_KERNEL) ::$(KERNEL_NAME) -mcopy -i $@.boot $@-boot.scr ::boot.scr endef @@ -37,7 +33,7 @@ endef define Build/boot-img-ext4 rm -fR $@.boot mkdir -p $@.boot - $(foreach dts,$(DEVICE_DTS), $(CP) $(DTS_DIR)/$(dts).dtb $@.boot;) + $(foreach dts,$(DEVICE_DTS), $(CP) $(KDIR)/image-$(dts).dtb $@.boot/$(dts).dtb;) $(CP) $(IMAGE_KERNEL) $@.boot/$(KERNEL_NAME) -$(CP) $@-boot.scr $@.boot/boot.scr make_ext4fs -J -l $(CONFIG_TARGET_KERNEL_PARTSIZE)M $@.bootimg $@.boot @@ -70,7 +66,7 @@ define Build/omnia-medkit-initramfs rm -rf $(dir $(IMAGE_KERNEL))boot mkdir -p $(dir $(IMAGE_KERNEL))boot/boot/ cp $(KDIR)/zImage-initramfs $(dir $(IMAGE_KERNEL))boot/boot/zImage - cp $(DTS_DIR)/$(DEVICE_DTS).dtb $(dir $(IMAGE_KERNEL))boot/boot/dtb + cp $(KDIR)/image-$(DEVICE_DTS).dtb $(dir $(IMAGE_KERNEL))boot/boot/dtb $(TAR) -rp --numeric-owner --owner=0 --group=0 --sort=name \ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \ --file=$@ -C $(dir $(IMAGE_KERNEL))boot/ . diff --git a/target/linux/mvebu/patches-4.14/105-build_new_dtbs.patch b/target/linux/mvebu/patches-4.14/105-build_new_dtbs.patch deleted file mode 100644 index 92880b9971..0000000000 --- a/target/linux/mvebu/patches-4.14/105-build_new_dtbs.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -1027,6 +1027,7 @@ dtb-$(CONFIG_MACH_ARMADA_38X) += \ - armada-385-linksys-cobra.dtb \ - armada-385-linksys-rango.dtb \ - armada-385-linksys-shelby.dtb \ -+ armada-385-linksys-venom.dtb \ - armada-385-synology-ds116.dtb \ - armada-385-turris-omnia.dtb \ - armada-388-clearfog.dtb \ From patchwork Sat May 11 17:37:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1098438 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AzyZnl2y"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="NTa6ZJQv"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 451Z7674NZz9s3Z for ; Sun, 12 May 2019 03:38:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date: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=8LnwVqyTPCA6OMf8JFfMmo4Sw1H+mnEh4aB0pn8LUWU=; b=AzyZnl2ywebVvmM4FdVQMRHV90 pCWQAwuozN8GPlQl7asIhjY7eqxjEz247HNklmQxPrxhrMaNQP4lMkgxMZQV5iXbzuMGIDyoyDUfo I817Ns+Qv3hywbRsnlfSrnSbiRg1m94XyXd0M7w9MAPeo//OxBo7enAYipNaz+9olSo5wqwx1Huso Yk3kzZiVk89LTfcRj8cLWhd5a/imGndQutbcBKuxtvwRte7KQF1Y6PhyGe/m7c482KwUyg18opFgy W9+44P6bMiIXCLBVIB+TA1yqMJxSNfdpXB1PP9sFJsO5YvuLNxX1agaoQ99dJ5HQIEI+9py6U7fa3 VX5nfrZQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwr-0006Ik-GQ; Sat, 11 May 2019 17:38:13 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwT-0005pH-6D for openwrt-devel@lists.openwrt.org; Sat, 11 May 2019 17:37:52 +0000 Received: (wp-smtpd smtp.tlen.pl 13685 invoked from network); 11 May 2019 19:37:45 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557596265; bh=XCw8Hi0ExXOO8e6aO1Yi5k00aloF3xeAUUxLtCsjx+o=; h=From:To:Subject; b=NTa6ZJQvOSFHDEXo3/dpVl5CIQtR7j7S1/U9pCKV2SVfAkNADmxr6HRDtlkHK7b8q csXPtML3qOXr+Ihy8iuXD2U37f3mMGatdBdVAOSPs4+VS5B0YC+cCxd12U4jqdjHTy UzS1VwAgDZRgNEFRWij9hn4HX7YfXENmR8spLFpk= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 May 2019 19:37:45 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 11 May 2019 19:37:29 +0200 Message-Id: <20190511173735.5549-3-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190511173735.5549-1-tomek_n@o2.pl> References: <20190511173735.5549-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 6d1ecff6a27088d1d3002981f26a4b1d X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [YVPU] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_103749_547258_AFA9E44C X-CRM114-Status: UNSURE ( 6.51 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v3 2/8] mvebu: image: stack repeated variables X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 All of arm64 devices have part of variables repeatedly defined. Stack them to common define, and reference it in each device recipe. Signed-off-by: Tomasz Maciej Nowak --- target/linux/mvebu/image/Makefile | 8 ++++++++ target/linux/mvebu/image/cortex-a53.mk | 12 ++---------- target/linux/mvebu/image/cortex-a72.mk | 20 +++++--------------- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 72b14e344b..5f4ab89716 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -83,6 +83,14 @@ define Device/Default endef DEVICE_VARS += UBOOT +define Device/Default-arm64 + DTS_DIR := $(DTS_DIR)/marvell + IMAGES := sdcard.img.gz + IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata + KERNEL_NAME := Image + KERNEL := kernel-bin +endef + define Device/UBI IMAGES := sysupgrade.bin IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata diff --git a/target/linux/mvebu/image/cortex-a53.mk b/target/linux/mvebu/image/cortex-a53.mk index dd6176100b..a102f52481 100644 --- a/target/linux/mvebu/image/cortex-a53.mk +++ b/target/linux/mvebu/image/cortex-a53.mk @@ -1,25 +1,17 @@ ifeq ($(SUBTARGET),cortexa53) define Device/globalscale-espressobin - KERNEL_NAME := Image - KERNEL := kernel-bin + $(call Device/Default-arm64) DEVICE_TITLE := ESPRESSObin (Marvell Armada 3700 Community Board) - IMAGES := sdcard.img.gz - IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata DEVICE_DTS := armada-3720-espressobin - DTS_DIR := $(DTS_DIR)/marvell SUPPORTED_DEVICES := globalscale,espressobin endef TARGET_DEVICES += globalscale-espressobin define Device/armada-3720-db - KERNEL_NAME := Image - KERNEL := kernel-bin + $(call Device/Default-arm64) DEVICE_TITLE := Marvell Armada 3720 Development Board DB-88F3720-DDR3 - IMAGES := sdcard.img.gz - IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata DEVICE_DTS := armada-3720-db - DTS_DIR := $(DTS_DIR)/marvell SUPPORTED_DEVICES := marvell,armada-3720-db endef TARGET_DEVICES += armada-3720-db diff --git a/target/linux/mvebu/image/cortex-a72.mk b/target/linux/mvebu/image/cortex-a72.mk index 25bcf534bc..824f6b5d0f 100644 --- a/target/linux/mvebu/image/cortex-a72.mk +++ b/target/linux/mvebu/image/cortex-a72.mk @@ -1,38 +1,28 @@ ifeq ($(SUBTARGET),cortexa72) define Device/armada-macchiatobin - KERNEL_NAME := Image - KERNEL := kernel-bin + $(call Device/Default-arm64) DEVICE_TITLE := MACCHIATObin (SolidRun Armada 8040 Community Board) DEVICE_PACKAGES += kmod-i2c-core kmod-i2c-mux kmod-i2c-mux-pca954x - IMAGES := sdcard.img.gz - IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata DEVICE_DTS := armada-8040-mcbin - DTS_DIR := $(DTS_DIR)/marvell SUPPORTED_DEVICES := marvell,armada8040-mcbin endef TARGET_DEVICES += armada-macchiatobin define Device/armada-8040-db - KERNEL_NAME := Image - KERNEL := kernel-bin + $(call Device/Default-arm64) DEVICE_TITLE := Marvell Armada 8040 DB board - IMAGES := sdcard.img.gz - IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata DEVICE_DTS := armada-8040-db - DTS_DIR := $(DTS_DIR)/marvell + IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata SUPPORTED_DEVICES := marvell,armada8040-db endef TARGET_DEVICES += armada-8040-db define Device/armada-7040-db - KERNEL_NAME := Image - KERNEL := kernel-bin + $(call Device/Default-arm64) DEVICE_TITLE := Marvell Armada 7040 DB board - IMAGES := sdcard.img.gz - IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata DEVICE_DTS := armada-7040-db - DTS_DIR := $(DTS_DIR)/marvell + IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata SUPPORTED_DEVICES := marvell,armada7040-db endef TARGET_DEVICES += armada-7040-db From patchwork Sat May 11 17:37:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1098441 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="kSs6yH7o"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="km5oihij"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 451Z7g2lMtz9s6w for ; Sun, 12 May 2019 03:38:55 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date: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=fRIZwJ7nPh1JofAvpd5TP9fYnz4N7Ks4N6IVVTpKOxo=; b=kSs6yH7ouljaBFi22epZvU0Z2Y fqJ14aBIOM2JtT407T9SaBOVT3PyaZbxzj2ZCK/S3FTckuvHKGXqAzYbcMLkNGqpr6kNMvv+uPQlj R1D/1qvjS3LUKpqKNYjkgAYeduWg7eMbme3u/wKTlLlkscvGI6OLFj0swM5L7U5AKfPGuDaKorQKA hFtSBzRI/N/EAtWK9YfM54I+u4SQ+wBYtjox6vvW1CZdQKzoL36k6AbKQadA8wWbVpU/ecsqZjvp8 M5/OWljIW6zAPF+eICwQO3gXC2ZAztgUnFc26ThXWxYdakHiGenOr2ujfbYOQlTGzanSaGDZSBOrH m+Uj90PQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVxM-000786-Ci; Sat, 11 May 2019 17:38:44 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwT-0005pJ-IO for openwrt-devel@lists.openwrt.org; Sat, 11 May 2019 17:37:53 +0000 Received: (wp-smtpd smtp.tlen.pl 14403 invoked from network); 11 May 2019 19:37:45 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557596266; bh=l2dauDLlZQtoiwW6tu13n/n4oZhupfmP0aelTS6R06E=; h=From:To:Subject; b=km5oihijuyYxgbyhdUg8huk5jzb3vx3u0cUeWNv9phhCg8ayU6oEDcktGp6mXFC8b tMcWpZENZBEaRQojm0ej/L1mcMiidnu04fVhJ50PDGkZwSnaS+WfTLWVurnqmYqKoY OjkMO9SYd4kbM2zEHbyWDAoQ/69BDhOVGnlnYLhM= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 May 2019 19:37:45 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 11 May 2019 19:37:30 +0200 Message-Id: <20190511173735.5549-4-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190511173735.5549-1-tomek_n@o2.pl> References: <20190511173735.5549-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 1ad9eb3ae34e6640948194e69586e1bb X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [kSMk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_103749_777428_DF65DDE6 X-CRM114-Status: GOOD ( 11.32 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v3 3/8] mvebu: image: introduce BOOT_SCRIPT variable X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 All of U-Boot scripts repeat the same pattern with only Device Tree blob name changing for respective device. Therefore create generic scripts which will be altered on demad by image build process, and create BOOT_SCRIPT variable which can be added to device recipe and will allow referencing the same script by many device recipes. This will allow to slim down the ammount of files in buildroot tree and avoid needlessly incrementing amount of boot scripts if new devices will be added. Signed-off-by: Tomasz Maciej Nowak --- target/linux/mvebu/image/Makefile | 10 ++++--- .../image/armada-388-clearfog-base.bootscript | 27 ------------------- .../image/armada-macchiatobin.bootscript | 10 ------- ...fog-pro.bootscript => clearfog.bootscript} | 6 +---- target/linux/mvebu/image/cortex-a9.mk | 4 ++- ...db.bootscript => generic-arm64.bootscript} | 2 +- .../image/globalscale-espressobin.bootscript | 10 ------- 7 files changed, 12 insertions(+), 57 deletions(-) delete mode 100644 target/linux/mvebu/image/armada-388-clearfog-base.bootscript delete mode 100644 target/linux/mvebu/image/armada-macchiatobin.bootscript rename target/linux/mvebu/image/{armada-388-clearfog-pro.bootscript => clearfog.bootscript} (78%) rename target/linux/mvebu/image/{armada-3720-db.bootscript => generic-arm64.bootscript} (82%) delete mode 100644 target/linux/mvebu/image/globalscale-espressobin.bootscript diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 5f4ab89716..95d4d5a79b 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -17,8 +17,10 @@ SIGNATURE:=$(shell printf "%.8s" $(SOURCE_DATE_EPOCH)) define Build/boot-scr rm -f $@-boot.scr - sed -e 's#@ROOT@#$(SIGNATURE)#g' \ - $(DEVICE_NAME).bootscript > $@-new.bootscript + sed \ + -e 's#@ROOT@#$(SIGNATURE)#g' \ + -e 's#@DTB@#$(firstword $(DEVICE_DTS))#g' \ + $(BOOT_SCRIPT).bootscript > $@-new.bootscript mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d $@-new.bootscript $@-boot.scr endef @@ -80,10 +82,12 @@ define Device/Default KERNEL := kernel-bin | append-dtb | uImage none SUPPORTED_DEVICES = $$(DEVICE_DTS) UBOOT := + BOOT_SCRIPT := endef -DEVICE_VARS += UBOOT +DEVICE_VARS += BOOT_SCRIPT UBOOT define Device/Default-arm64 + BOOT_SCRIPT := generic-arm64 DTS_DIR := $(DTS_DIR)/marvell IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata diff --git a/target/linux/mvebu/image/armada-388-clearfog-base.bootscript b/target/linux/mvebu/image/armada-388-clearfog-base.bootscript deleted file mode 100644 index 1755203dc5..0000000000 --- a/target/linux/mvebu/image/armada-388-clearfog-base.bootscript +++ /dev/null @@ -1,27 +0,0 @@ -# Standard Boot-Script -# use only well-known variable names provided by U-Boot Distro boot -# This script assumes that there is a boot partition, -# and that the root partition is always the next one. - -# Override DeviceTree for Clearfog Base -# removed once U-Boot is able to detect the board variant. -setenv fdtfile armada-388-clearfog-base.dtb - -# rootfs is always on the next partition -setexpr openwrt_rootpart ${distro_bootpart} + 1 - -# figure out partition uuid to pass to the kernel as root= -part uuid ${devtype} ${devnum}:${openwrt_rootpart} uuid - -# generate bootargs (rootfs) -setenv bootargs ${bootargs} root=PARTUUID=${uuid} rootfstype=auto rootwait - -# add console= option to bootargs, if any -if test -n "${console}"; then - setenv bootargs ${bootargs} console=${console} -fi - -echo "Booting Linux with ${bootargs}" -load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile} -load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage -bootz ${kernel_addr_r} - ${fdt_addr_r} diff --git a/target/linux/mvebu/image/armada-macchiatobin.bootscript b/target/linux/mvebu/image/armada-macchiatobin.bootscript deleted file mode 100644 index ae9fdca92d..0000000000 --- a/target/linux/mvebu/image/armada-macchiatobin.bootscript +++ /dev/null @@ -1,10 +0,0 @@ -setenv bootargs "root=PARTUUID=@ROOT@-02 rw rootwait" - -if test -n "${console}"; then - setenv bootargs "${bootargs} ${console}" -fi - -load mmc 1:1 ${fdt_addr} armada-8040-mcbin.dtb -load mmc 1:1 ${kernel_addr} Image - -booti ${kernel_addr} - ${fdt_addr} diff --git a/target/linux/mvebu/image/armada-388-clearfog-pro.bootscript b/target/linux/mvebu/image/clearfog.bootscript similarity index 78% rename from target/linux/mvebu/image/armada-388-clearfog-pro.bootscript rename to target/linux/mvebu/image/clearfog.bootscript index 99aa145858..20ba76f0da 100644 --- a/target/linux/mvebu/image/armada-388-clearfog-pro.bootscript +++ b/target/linux/mvebu/image/clearfog.bootscript @@ -3,10 +3,6 @@ # This script assumes that there is a boot partition, # and that the root partition is always the next one. -# Override DeviceTree for Clearfog Pro -# removed once U-Boot has been updated to the new name. -setenv fdtfile armada-388-clearfog-pro.dtb - # rootfs is always on the next partition setexpr openwrt_rootpart ${distro_bootpart} + 1 @@ -22,6 +18,6 @@ if test -n "${console}"; then fi echo "Booting Linux with ${bootargs}" -load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${fdtfile} +load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} @DTB@.dtb load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} zImage bootz ${kernel_addr_r} - ${fdt_addr_r} diff --git a/target/linux/mvebu/image/cortex-a9.mk b/target/linux/mvebu/image/cortex-a9.mk index 66cf54f9c5..8e9ef41fb6 100644 --- a/target/linux/mvebu/image/cortex-a9.mk +++ b/target/linux/mvebu/image/cortex-a9.mk @@ -132,6 +132,7 @@ define Device/armada-388-clearfog-pro DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base SUPPORTED_DEVICES := armada-388-clearfog-pro armada-388-clearfog UBOOT := clearfog-u-boot-spl.kwb + BOOT_SCRIPT := clearfog endef TARGET_DEVICES += armada-388-clearfog-pro @@ -142,8 +143,9 @@ define Device/armada-388-clearfog-base DEVICE_PACKAGES := mkf2fs e2fsprogs partx-utils IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata - DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base + DEVICE_DTS := armada-388-clearfog-base armada-388-clearfog-pro UBOOT := clearfog-u-boot-spl.kwb + BOOT_SCRIPT := clearfog endef TARGET_DEVICES += armada-388-clearfog-base diff --git a/target/linux/mvebu/image/armada-3720-db.bootscript b/target/linux/mvebu/image/generic-arm64.bootscript similarity index 82% rename from target/linux/mvebu/image/armada-3720-db.bootscript rename to target/linux/mvebu/image/generic-arm64.bootscript index 65e39a1af5..f395590f84 100644 --- a/target/linux/mvebu/image/armada-3720-db.bootscript +++ b/target/linux/mvebu/image/generic-arm64.bootscript @@ -4,7 +4,7 @@ if test -n "${console}"; then setenv bootargs "${bootargs} ${console}" fi -load mmc 0:1 ${fdt_addr} armada-3720-db.dtb +load mmc 0:1 ${fdt_addr} @DTB@.dtb load mmc 0:1 ${kernel_addr} Image booti ${kernel_addr} - ${fdt_addr} diff --git a/target/linux/mvebu/image/globalscale-espressobin.bootscript b/target/linux/mvebu/image/globalscale-espressobin.bootscript deleted file mode 100644 index 0d03ac8513..0000000000 --- a/target/linux/mvebu/image/globalscale-espressobin.bootscript +++ /dev/null @@ -1,10 +0,0 @@ -setenv bootargs "root=PARTUUID=@ROOT@-02 rw rootwait" - -if test -n "${console}"; then - setenv bootargs "${bootargs} ${console}" -fi - -load mmc 0:1 ${fdt_addr} armada-3720-espressobin.dtb -load mmc 0:1 ${kernel_addr} Image - -booti ${kernel_addr} - ${fdt_addr} From patchwork Sat May 11 17:37:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1098440 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pisdEt65"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="apjwyNU3"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 451Z7R3M2pz9s6w for ; Sun, 12 May 2019 03:38:43 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date: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=SC2Ta5VVMsKVuI0SvNAPzllcZSOS/2WFzGV49esrgQs=; b=pisdEt6554N2hQBhTtPzMX4PNw 6NX3tj/yW3WV2agYz5ZFDBl+sNuh1l4ewprcyLYam+RnFHVJkE1Ca5A/YivI8k0xkRWm8Fl8voxwa hhdxOeyrxpsSu9z0SFctddCQfqn2ElLe/MnaP4cVuZaqN3FCWufj8+O85AV9Yg0VhHwXuqS7MFNaX Lr04RM3BOFusTxHWevCychiKD6IJY006SWbl8Cd3EOVT7dEIPfIC8P3Ob0mwU6c3fofYfl+3bLUfm 5YzVWxNGpFauwKGsrSzYaTRILpDEK8MdP4FVFaAN04yLAQvjj0n91nYwC974g1M9KFS9sPp0CEPCs ZwrrIxIA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVxC-0006ni-2h; Sat, 11 May 2019 17:38:34 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwU-0005pK-7P for openwrt-devel@lists.openwrt.org; Sat, 11 May 2019 17:37:53 +0000 Received: (wp-smtpd smtp.tlen.pl 15120 invoked from network); 11 May 2019 19:37:46 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557596266; bh=ObPoMDrMC0tkL4+EpMcxCCLPMUmgjIlHq39ofGUn0cw=; h=From:To:Subject; b=apjwyNU3JLrxxm9X6jLQXs7bcHRErNtBVpdqSbanAIH3+Vg8EI9UVC0AgkM1CuFJb +Nbc44xQ6JOqZjRChyHOBJdDONAfChoCpYPa4zqySzZKjhFqPysmAMfGQJwU4TBqFR kTJ683Pchoc5IbUgM8zNGq5epgD36f6+LXWQ0rfU= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 May 2019 19:37:46 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 11 May 2019 19:37:31 +0200 Message-Id: <20190511173735.5549-5-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190511173735.5549-1-tomek_n@o2.pl> References: <20190511173735.5549-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: eb06786a7a5f84337884ec16aa8074f7 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [ESME] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_103750_425524_78DD7F7B X-CRM114-Status: UNSURE ( 6.07 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v3 4/8] mvebu: image: improve readability of device recipes X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 Drop overly complex amount of defines wich are referenced in the same devices pool and move image recipes to common define, since devices not using them overwrite it. Signed-off-by: Tomasz Maciej Nowak --- target/linux/mvebu/image/Makefile | 21 ++++----------- target/linux/mvebu/image/cortex-a9.mk | 39 ++++++++++----------------- 2 files changed, 19 insertions(+), 41 deletions(-) diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 95d4d5a79b..108b569c07 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -80,7 +80,11 @@ define Device/Default BOARD_NAME = $$(DEVICE_DTS) KERNEL_NAME := zImage KERNEL := kernel-bin | append-dtb | uImage none - SUPPORTED_DEVICES = $$(DEVICE_DTS) + IMAGES := sysupgrade.bin + IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(PAGESIZE) + IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata + SUPPORTED_DEVICES = $$(firstword $$(DEVICE_DTS)) + UBINIZE_OPTS := -E 5 UBOOT := BOOT_SCRIPT := endef @@ -95,20 +99,7 @@ define Device/Default-arm64 KERNEL := kernel-bin endef -define Device/UBI - IMAGES := sysupgrade.bin - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata -endef - -define Device/UBI-factory - $(Device/UBI) - UBINIZE_OPTS := -E 5 - IMAGES += factory.img - IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(PAGESIZE) -endef - define Device/NAND-128K - $(Device/UBI) BLOCKSIZE := 128k PAGESIZE := 2048 SUBPAGESIZE := 512 @@ -116,13 +107,11 @@ define Device/NAND-128K endef define Device/NAND-256K - $(Device/UBI) BLOCKSIZE := 256k PAGESIZE := 4096 endef define Device/NAND-512K - $(Device/UBI) BLOCKSIZE := 512k PAGESIZE := 4096 endef diff --git a/target/linux/mvebu/image/cortex-a9.mk b/target/linux/mvebu/image/cortex-a9.mk index 8e9ef41fb6..252300b942 100644 --- a/target/linux/mvebu/image/cortex-a9.mk +++ b/target/linux/mvebu/image/cortex-a9.mk @@ -9,19 +9,15 @@ ifeq ($(SUBTARGET),cortexa9) define Device/linksys - DEVICE_TITLE := Linksys $(1) - DEVICE_PACKAGES := kmod-mwlwifi wpad-basic swconfig -endef - -define Device/armada-385-linksys $(Device/NAND-128K) - $(Device/UBI-factory) + DEVICE_TITLE := Linksys $(1) + DEVICE_PACKAGES := kmod-mwlwifi swconfig wpad-basic + IMAGES += factory.img KERNEL_SIZE := 6144k endef define Device/linksys-wrt1200ac $(call Device/linksys,WRT1200AC (Caiman)) - $(Device/armada-385-linksys) DEVICE_DTS := armada-385-linksys-caiman DEVICE_PACKAGES += mwlwifi-firmware-88w8864 endef @@ -29,7 +25,6 @@ TARGET_DEVICES += linksys-wrt1200ac define Device/linksys-wrt1900acv2 $(call Device/linksys,WRT1900ACv2 (Cobra)) - $(Device/armada-385-linksys) DEVICE_DTS := armada-385-linksys-cobra DEVICE_PACKAGES += mwlwifi-firmware-88w8864 endef @@ -37,7 +32,6 @@ TARGET_DEVICES += linksys-wrt1900acv2 define Device/linksys-wrt3200acm $(call Device/linksys,WRT3200ACM (Rango)) - $(Device/armada-385-linksys) DEVICE_DTS := armada-385-linksys-rango DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 endef @@ -45,17 +39,15 @@ TARGET_DEVICES += linksys-wrt3200acm define Device/linksys-wrt1900acs $(call Device/linksys,WRT1900ACS (Shelby)) - $(Device/armada-385-linksys) DEVICE_DTS := armada-385-linksys-shelby DEVICE_PACKAGES += mwlwifi-firmware-88w8864 endef TARGET_DEVICES += linksys-wrt1900acs define Device/linksys-wrt32x -$(call Device/linksys,WRT32X (Venom)) + $(call Device/linksys,WRT32X (Venom)) DEVICE_DTS := armada-385-linksys-venom DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 - $(Device/armada-385-linksys) KERNEL_SIZE := 3072k KERNEL := kernel-bin | append-dtb endef @@ -65,18 +57,16 @@ define Device/linksys-wrt1900ac $(call Device/linksys,WRT1900AC (Mamba)) DEVICE_DTS := armada-xp-linksys-mamba DEVICE_PACKAGES += mwlwifi-firmware-88w8864 - $(Device/NAND-128K) - $(Device/UBI-factory) KERNEL_SIZE := 3072k endef TARGET_DEVICES += linksys-wrt1900ac define Device/openblocks-ax3-4 - $(Device/UBI-factory) DEVICE_DTS := armada-xp-openblocks-ax3-4 SUPPORTED_DEVICES := $(1) BLOCKSIZE := 128k PAGESIZE := 1 + IMAGES += factory.img IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi DEVICE_TITLE := Plat'Home OpenBlocks AX3 endef @@ -84,34 +74,33 @@ TARGET_DEVICES += openblocks-ax3-4 define Device/armada-385-db-ap $(Device/NAND-256K) - $(Device/UBI-factory) + IMAGES += factory.img KERNEL_SIZE := 8192k DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP) endef TARGET_DEVICES += armada-385-db-ap -define Device/marvell-nand - $(Device/NAND-512K) - DEVICE_TITLE := Marvell Armada $(1) -endef - define Device/armada-370-db - $(call Device/marvell-nand,370 DB (DB-88F6710-BP-DDR3)) + $(Device/NAND-512K) + DEVICE_TITLE := Marvell Armada 370 DB (DB-88F6710-BP-DDR3) endef TARGET_DEVICES += armada-370-db define Device/armada-370-rd - $(call Device/marvell-nand,370 RD (RD-88F6710-A1)) + $(Device/NAND-512K) + DEVICE_TITLE := Marvell Armada 370 RD (RD-88F6710-A1) endef TARGET_DEVICES += armada-370-rd define Device/armada-xp-db - $(call Device/marvell-nand,XP DB (DB-78460-BP)) + $(Device/NAND-512K) + DEVICE_TITLE := Marvell Armada XP DB (DB-78460-BP) endef TARGET_DEVICES += armada-xp-db define Device/armada-xp-gp - $(call Device/marvell-nand,XP GP (DB-MV784MP-GP)) + $(Device/NAND-512K) + DEVICE_TITLE := Marvell Armada XP GP (DB-MV784MP-GP) endef TARGET_DEVICES += armada-xp-gp From patchwork Sat May 11 17:37:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1098439 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qAtZDfXF"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="lTm7tJQ0"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 451Z7G46j3z9s3Z for ; Sun, 12 May 2019 03:38:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date: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=ESYL0d8HlgqeRl+O2Da3AtMiVHlp9sTSXjaoJW1+K2w=; b=qAtZDfXFrJBlzF/HZBBNmIhciF mjnK3VWxXKerlJv+yPJfsPtVbe2YRhwysyN05cSzBZIzU2/13fcAWkkDWQHbYQkciaHSuM9j3E1Oo MXBszkJFYfXKJ+fOJ/kX6FXk4G6+Ms546ZIrKOj/xX1uLtPf9UQeFE3Q4L4GaOAu0xNxQWe6hhTWd ZZZm+FGz6CWEaxFRNzLg98sT9ICJ4WCPoZw9YQ60dkbN06ALT8TiGnY+0VM4blaPal3DNcsIi9X6J Qut//2qfbVQcQH9eVhft/zk1vJdeUZBL9WzMkWPRAFmWpaiZFq+AMR/pgLVcs9y3ohDN+6fYxMFJO YL+4XiCQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVx1-0006YO-LC; Sat, 11 May 2019 17:38:23 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwU-0005pO-GQ for openwrt-devel@lists.openwrt.org; Sat, 11 May 2019 17:37:53 +0000 Received: (wp-smtpd smtp.tlen.pl 15546 invoked from network); 11 May 2019 19:37:47 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557596267; bh=Dlzt0wlpqW9TfEj4dNSVn8ZdNSMYrjKZMSlTKTcXTf0=; h=From:To:Subject; b=lTm7tJQ0iNwnqyT5R6/UagOsCC3rTNWLcuTwd/MM/zcL5Lc1bDkZydoxwVhCXWuiw 0JvDNW+M+2HYghMJWm5Ad8+WtMMA4OsFBdsrl60QeAcHdqyUuq4d4XBqdiMXjJklzF FE8zlDXGc0hBbGj3y3n1vmWy1IUfFe6gaVdQsEsY= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 May 2019 19:37:47 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 11 May 2019 19:37:32 +0200 Message-Id: <20190511173735.5549-6-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190511173735.5549-1-tomek_n@o2.pl> References: <20190511173735.5549-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 282b6abd253b66951576116b3515a5ef X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [EZO0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_103750_702790_66104356 X-CRM114-Status: UNSURE ( 6.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v3 5/8] mvebu: image: don't create unnecessarily shell variables X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 Use make syntax to pass the U-Boot image location and boot with root partitions size, instead of relying on shell functions and variables. Signed-off-by: Tomasz Maciej Nowak --- target/linux/mvebu/image/Makefile | 18 ++++++------------ .../linux/mvebu/image/gen_mvebu_sdcard_img.sh | 4 ++-- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 108b569c07..9084b3e028 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -42,25 +42,19 @@ define Build/boot-img-ext4 endef define Build/sdcard-img - if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \ - BOOTFS_SIZE=$$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 * 2 )); \ - ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \ SIGNATURE="$(SIGNATURE)" \ ./gen_mvebu_sdcard_img.sh $@ \ - $$UBOOT \ - c $$BOOTFS_SIZE $@.boot \ - 83 $$ROOTFS_SIZE $(IMAGE_ROOTFS) + $(if $(UBOOT),$(STAGING_DIR_IMAGE)/$(UBOOT)) \ + c $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.boot \ + 83 $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) endef define Build/sdcard-img-ext4 - if [ -n "$(UBOOT)" ]; then UBOOT="$(STAGING_DIR_IMAGE)/$(UBOOT)"; fi; \ - BOOTFS_SIZE=$$(( $(CONFIG_TARGET_KERNEL_PARTSIZE) * 1024 * 2 )); \ - ROOTFS_SIZE=$$(( $(CONFIG_TARGET_ROOTFS_PARTSIZE) * 1024 * 2 )); \ SIGNATURE="$(SIGNATURE)" \ ./gen_mvebu_sdcard_img.sh $@ \ - $$UBOOT \ - 83 $$BOOTFS_SIZE $@.bootimg \ - 83 $$ROOTFS_SIZE $(IMAGE_ROOTFS) + $(if $(UBOOT),$(STAGING_DIR_IMAGE)/$(UBOOT)) \ + 83 $(CONFIG_TARGET_KERNEL_PARTSIZE) $@.bootimg \ + 83 $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(IMAGE_ROOTFS) endef define Build/omnia-medkit-initramfs diff --git a/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh index 67416ed80c..e0230e48b6 100755 --- a/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh +++ b/target/linux/mvebu/image/gen_mvebu_sdcard_img.sh @@ -18,7 +18,7 @@ # usage() { - echo "$0 [ ]?" + echo "$0 [ ]?" } # always require first 2 or 3 arguments @@ -46,7 +46,7 @@ dd if=/dev/zero of="$OUTFILE" bs=512 count=1 >/dev/null printf "Done\n" while [ "$#" -ge 3 ]; do - ptgen_args="$ptgen_args -t $1 -p $(($2 / 2 + 256))" + ptgen_args="$ptgen_args -t $1 -p $(($2 * 1024 + 256))" parts="$parts$3 " shift; shift; shift done From patchwork Sat May 11 17:37:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1098442 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SbcR3PqU"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="vGc2RUrg"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 451Z7n3bR3z9s6w for ; Sun, 12 May 2019 03:39:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date: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=c7MZD822R519OrASdHJgVtbXvItdiiDgkASbHcn1ZT4=; b=SbcR3PqUpRY60vtGgiVwYFPomb K7cL8SV+7gAFUg3KWMbA1u8AeBFp9S54W9o2QwqOSs3I0Pr+PFDRAL67j0WivsPFwsrmF8qXTAzqq dAfPBTMf8hseQjqCQB5gpZSmr28iuvSZNFwlZD30ksyKqZN+HXkuHBUIpD7hSbZGjzSKlZPj6uYVD NESqewzAozvw3/0m3PBHt1BQXTXmCEkKxyQNtEbi8dQcyQfaGgOeSSu0fmWkKWLt8y15pb6xbZfzW U4dqROE8G/98bloJ0JvkTI1oCS4SmL4bdUcdHpqOuGPWnIvkglBHg/G6nc9EqRqKp46Q7m0R0ginj /pz94CYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVxW-0007N3-0j; Sat, 11 May 2019 17:38:54 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwV-0005qA-Gt for openwrt-devel@lists.openwrt.org; Sat, 11 May 2019 17:37:53 +0000 Received: (wp-smtpd smtp.tlen.pl 17138 invoked from network); 11 May 2019 19:37:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557596269; bh=05dfMlB4hCMSjZ8+/izERifrIgFXjGOhzFLVVvf6gv8=; h=From:To:Subject; b=vGc2RUrgst3WIBS/1/TU8DJGBPziDQUuc5LtLo8o7dWWbg6OzERuU4gzYt4SiHyWP 9KNWYDebCXzEP+RfXHL3QPm38AbOekwWW+20EbTWwpvUsHY/FsLbV3S876JM+OxUoo r9XL7+Gio3ZH9itdeoLyZOlmt6NOStIRtd9nSitk= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 May 2019 19:37:49 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 11 May 2019 19:37:33 +0200 Message-Id: <20190511173735.5549-7-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190511173735.5549-1-tomek_n@o2.pl> References: <20190511173735.5549-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 68754ea256c5e266dfdbf592d91fdbae X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [EQO0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_103751_826769_4E4C8174 X-CRM114-Status: UNSURE ( 8.18 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v3 6/8] mvebu: align device names to vendor_device format X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 Add vendors in device names and also rename few device names, for easier identyfying potential firmware to flash. The vendor and device string is mainly derived from model/compatipble string in dts from particular device, but since not all devices are well described, some of the renames follow marketing names. Signed-off-by: Tomasz Maciej Nowak --- package/boot/uboot-mvebu/Makefile | 2 +- target/linux/mvebu/image/Makefile | 1 - target/linux/mvebu/image/cortex-a53.mk | 8 +-- target/linux/mvebu/image/cortex-a72.mk | 12 ++-- target/linux/mvebu/image/cortex-a9.mk | 76 ++++++++++++++------------ 5 files changed, 52 insertions(+), 47 deletions(-) diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index 61547acb27..c24bfe3ff0 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -24,7 +24,7 @@ endef define U-Boot/clearfog NAME:=SolidRun ClearFog A1 - BUILD_DEVICES:=armada-388-clearfog-base armada-388-clearfog-pro + BUILD_DEVICES:=solidrun_clearfog-base-a1 solidrun_clearfog-pro-a1 BUILD_SUBTARGET:=cortexa9 UBOOT_IMAGE:=u-boot-spl.kwb endef diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index 9084b3e028..f432a37911 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -70,7 +70,6 @@ endef define Device/Default PROFILES := Default - DEVICE_DTS := $(1) BOARD_NAME = $$(DEVICE_DTS) KERNEL_NAME := zImage KERNEL := kernel-bin | append-dtb | uImage none diff --git a/target/linux/mvebu/image/cortex-a53.mk b/target/linux/mvebu/image/cortex-a53.mk index a102f52481..5a3e9b4d07 100644 --- a/target/linux/mvebu/image/cortex-a53.mk +++ b/target/linux/mvebu/image/cortex-a53.mk @@ -1,19 +1,19 @@ ifeq ($(SUBTARGET),cortexa53) -define Device/globalscale-espressobin +define Device/globalscale_espressobin $(call Device/Default-arm64) DEVICE_TITLE := ESPRESSObin (Marvell Armada 3700 Community Board) DEVICE_DTS := armada-3720-espressobin SUPPORTED_DEVICES := globalscale,espressobin endef -TARGET_DEVICES += globalscale-espressobin +TARGET_DEVICES += globalscale_espressobin -define Device/armada-3720-db +define Device/marvell_armada-3720-db $(call Device/Default-arm64) DEVICE_TITLE := Marvell Armada 3720 Development Board DB-88F3720-DDR3 DEVICE_DTS := armada-3720-db SUPPORTED_DEVICES := marvell,armada-3720-db endef -TARGET_DEVICES += armada-3720-db +TARGET_DEVICES += marvell_armada-3720-db endif diff --git a/target/linux/mvebu/image/cortex-a72.mk b/target/linux/mvebu/image/cortex-a72.mk index 824f6b5d0f..b1069b1f0b 100644 --- a/target/linux/mvebu/image/cortex-a72.mk +++ b/target/linux/mvebu/image/cortex-a72.mk @@ -1,30 +1,30 @@ ifeq ($(SUBTARGET),cortexa72) -define Device/armada-macchiatobin +define Device/marvell_macchiatobin $(call Device/Default-arm64) DEVICE_TITLE := MACCHIATObin (SolidRun Armada 8040 Community Board) DEVICE_PACKAGES += kmod-i2c-core kmod-i2c-mux kmod-i2c-mux-pca954x DEVICE_DTS := armada-8040-mcbin SUPPORTED_DEVICES := marvell,armada8040-mcbin endef -TARGET_DEVICES += armada-macchiatobin +TARGET_DEVICES += marvell_macchiatobin -define Device/armada-8040-db +define Device/marvell_armada8040-db $(call Device/Default-arm64) DEVICE_TITLE := Marvell Armada 8040 DB board DEVICE_DTS := armada-8040-db IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata SUPPORTED_DEVICES := marvell,armada8040-db endef -TARGET_DEVICES += armada-8040-db +TARGET_DEVICES += marvell_armada8040-db -define Device/armada-7040-db +define Device/marvell_armada7040-db $(call Device/Default-arm64) DEVICE_TITLE := Marvell Armada 7040 DB board DEVICE_DTS := armada-7040-db IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata SUPPORTED_DEVICES := marvell,armada7040-db endef -TARGET_DEVICES += armada-7040-db +TARGET_DEVICES += marvell_armada7040-db endif diff --git a/target/linux/mvebu/image/cortex-a9.mk b/target/linux/mvebu/image/cortex-a9.mk index 252300b942..baaeb8ddb6 100644 --- a/target/linux/mvebu/image/cortex-a9.mk +++ b/target/linux/mvebu/image/cortex-a9.mk @@ -16,102 +16,108 @@ define Device/linksys KERNEL_SIZE := 6144k endef -define Device/linksys-wrt1200ac +define Device/linksys_wrt1200ac $(call Device/linksys,WRT1200AC (Caiman)) DEVICE_DTS := armada-385-linksys-caiman DEVICE_PACKAGES += mwlwifi-firmware-88w8864 endef -TARGET_DEVICES += linksys-wrt1200ac +TARGET_DEVICES += linksys_wrt1200ac -define Device/linksys-wrt1900acv2 +define Device/linksys_wrt1900acv2 $(call Device/linksys,WRT1900ACv2 (Cobra)) DEVICE_DTS := armada-385-linksys-cobra DEVICE_PACKAGES += mwlwifi-firmware-88w8864 endef -TARGET_DEVICES += linksys-wrt1900acv2 +TARGET_DEVICES += linksys_wrt1900acv2 -define Device/linksys-wrt3200acm +define Device/linksys_wrt3200acm $(call Device/linksys,WRT3200ACM (Rango)) DEVICE_DTS := armada-385-linksys-rango DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 endef -TARGET_DEVICES += linksys-wrt3200acm +TARGET_DEVICES += linksys_wrt3200acm -define Device/linksys-wrt1900acs +define Device/linksys_wrt1900acs $(call Device/linksys,WRT1900ACS (Shelby)) DEVICE_DTS := armada-385-linksys-shelby DEVICE_PACKAGES += mwlwifi-firmware-88w8864 endef -TARGET_DEVICES += linksys-wrt1900acs +TARGET_DEVICES += linksys_wrt1900acs -define Device/linksys-wrt32x +define Device/linksys_wrt32x $(call Device/linksys,WRT32X (Venom)) DEVICE_DTS := armada-385-linksys-venom DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 KERNEL_SIZE := 3072k KERNEL := kernel-bin | append-dtb endef -TARGET_DEVICES += linksys-wrt32x +TARGET_DEVICES += linksys_wrt32x -define Device/linksys-wrt1900ac +define Device/linksys_wrt1900ac $(call Device/linksys,WRT1900AC (Mamba)) DEVICE_DTS := armada-xp-linksys-mamba DEVICE_PACKAGES += mwlwifi-firmware-88w8864 KERNEL_SIZE := 3072k endef -TARGET_DEVICES += linksys-wrt1900ac +TARGET_DEVICES += linksys_wrt1900ac -define Device/openblocks-ax3-4 +define Device/plathome_openblocks-ax3-4 DEVICE_DTS := armada-xp-openblocks-ax3-4 - SUPPORTED_DEVICES := $(1) + SUPPORTED_DEVICES := openblocks-ax3-4 BLOCKSIZE := 128k PAGESIZE := 1 IMAGES += factory.img IMAGE/factory.img := append-kernel | pad-to $$(BLOCKSIZE) | append-ubi DEVICE_TITLE := Plat'Home OpenBlocks AX3 endef -TARGET_DEVICES += openblocks-ax3-4 +TARGET_DEVICES += plathome_openblocks-ax3-4 -define Device/armada-385-db-ap +define Device/marvell_a385-db-ap $(Device/NAND-256K) + DEVICE_DTS := armada-385-db-ap IMAGES += factory.img KERNEL_SIZE := 8192k DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP) endef -TARGET_DEVICES += armada-385-db-ap +TARGET_DEVICES += marvell_a385-db-ap -define Device/armada-370-db +define Device/marvell_a370-db $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada 370 DB (DB-88F6710-BP-DDR3) + DEVICE_DTS := armada-370-db endef -TARGET_DEVICES += armada-370-db +TARGET_DEVICES += marvell_a370-db -define Device/armada-370-rd +define Device/marvell_a370-rd $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada 370 RD (RD-88F6710-A1) + DEVICE_DTS := armada-370-rd endef -TARGET_DEVICES += armada-370-rd +TARGET_DEVICES += marvell_a370-rd -define Device/armada-xp-db +define Device/marvell_axp-db $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada XP DB (DB-78460-BP) + DEVICE_DTS := armada-xp-db endef -TARGET_DEVICES += armada-xp-db +TARGET_DEVICES += marvell_axp-db -define Device/armada-xp-gp +define Device/marvell_axp-gp $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada XP GP (DB-MV784MP-GP) + DEVICE_DTS := armada-xp-gp endef -TARGET_DEVICES += armada-xp-gp +TARGET_DEVICES += marvell_axp-gp -define Device/armada-388-rd +define Device/marvell_a388-rd DEVICE_TITLE := Marvell Armada 388 RD (RD-88F6820-AP) + DEVICE_DTS := armada-388-rd IMAGES := firmware.bin IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs endef -TARGET_DEVICES += armada-388-rd +TARGET_DEVICES += marvell_a388-rd -define Device/armada-388-clearfog-pro +define Device/solidrun_clearfog-pro-a1 KERNEL_INSTALL := 1 KERNEL := kernel-bin DEVICE_TITLE := SolidRun ClearFog Pro @@ -123,9 +129,9 @@ define Device/armada-388-clearfog-pro UBOOT := clearfog-u-boot-spl.kwb BOOT_SCRIPT := clearfog endef -TARGET_DEVICES += armada-388-clearfog-pro +TARGET_DEVICES += solidrun_clearfog-pro-a1 -define Device/armada-388-clearfog-base +define Device/solidrun_clearfog-base-a1 KERNEL_INSTALL := 1 KERNEL := kernel-bin DEVICE_TITLE := SolidRun ClearFog Base @@ -136,17 +142,17 @@ define Device/armada-388-clearfog-base UBOOT := clearfog-u-boot-spl.kwb BOOT_SCRIPT := clearfog endef -TARGET_DEVICES += armada-388-clearfog-base +TARGET_DEVICES += solidrun_clearfog-base-a1 -define Device/globalscale-mirabox +define Device/globalscale_mirabox $(Device/NAND-512K) DEVICE_DTS := armada-370-mirabox SUPPORTED_DEVICES := mirabox DEVICE_TITLE := Globalscale Mirabox endef -TARGET_DEVICES += globalscale-mirabox +TARGET_DEVICES += globalscale_mirabox -define Device/turris-omnia +define Device/cznic_turris-omnia KERNEL_INSTALL := 1 KERNEL := kernel-bin KERNEL_INITRAMFS := kernel-bin @@ -161,6 +167,6 @@ define Device/turris-omnia IMAGE_NAME = $$(2) DEVICE_DTS := armada-385-turris-omnia endef -TARGET_DEVICES += turris-omnia +TARGET_DEVICES += cznic_turris-omnia endif From patchwork Sat May 11 17:37:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1098444 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tUeKFFml"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="tdxYOBd1"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 451Z8N4xtXz9s7h for ; Sun, 12 May 2019 03:39:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date: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=0oq9cELMmRMmMZmHBGgZJfGlzPzhlkst3Gmqur8PfnI=; b=tUeKFFml3qkSdz0QXhfHhIbIKU nOTPAPFKbqE08o+upz5yL3MyUfhovnEs8HLmHxR4R6y4w2zWlT35uTs8eI4HxeJ7bblaUIffLjHs4 1n118tRITbMq+Gdk+ONbp3Tp93UvAtLQVJ0F/CpEZNF5ell+c+nkpQ+rH3SWRpGTrKskSB8Uv3yDA R4eSR5xHfD3kLVuf/ZhGIzm0OwR47aJJRqDTio2EEMqld4rdibSF2qa9JuJYFKiL05DT1H66eBrWQ wKHnnbetoNTrh24mvqH1DNLGc8xa9ZfUhId9sfWuW3QBMeCfk3dz2YHurrhoJn8a7YjIg2Txe3qAJ seCP30/A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVxp-0007qW-LE; Sat, 11 May 2019 17:39:13 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwX-0005r1-3K for openwrt-devel@lists.openwrt.org; Sat, 11 May 2019 17:38:04 +0000 Received: (wp-smtpd smtp.tlen.pl 17992 invoked from network); 11 May 2019 19:37:50 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557596270; bh=b7lS9Nto75PFYKqsnECYtDWPqL4DOW8sxnZcGHh2YmA=; h=From:To:Subject; b=tdxYOBd12/biScNFZH8iDJOxCHSWh13OCxEQIOB/m9udDDUK/I3HKqtL4QCeAvAbB gF75yCh3H+R+5wsZk0iohGIG4vfRDJO8v5eJyh/DV6YZ6zILgRUkUqyxEHNdlYge3K MRqu70FEzGXYvF7XIIX/eUO185QzZ3QZtiE31J24= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 May 2019 19:37:50 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 11 May 2019 19:37:34 +0200 Message-Id: <20190511173735.5549-8-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190511173735.5549-1-tomek_n@o2.pl> References: <20190511173735.5549-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: de79d423ae47f3a8c9713a1bbc4d0889 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [gYOk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_103753_741887_3256E725 X-CRM114-Status: UNSURE ( 9.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v3 7/8] mvebu: use device-tree board detection X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 Convert whole target to Device Tree based board detection instead of identifying devices by dts file name. With this we can drop mvebu.sh translation script and rely on common method for model detection. Signed-off-by: Tomasz Maciej Nowak --- package/boot/uboot-envtools/files/mvebu | 26 ++--- .../mvebu/base-files/etc/board.d/01_leds | 22 ++--- .../mvebu/base-files/etc/board.d/02_network | 60 ++++++------ target/linux/mvebu/base-files/etc/diag.sh | 16 ++-- .../base-files/etc/init.d/linksys_recovery | 2 +- .../base-files/etc/uci-defaults/03_wireless | 4 +- .../base-files/etc/uci-defaults/04_mambafan | 2 +- target/linux/mvebu/base-files/lib/mvebu.sh | 94 ------------------- .../mvebu/base-files/lib/preinit/01_sysinfo | 9 -- .../base-files/lib/preinit/06_set_iface_mac | 14 +-- .../base-files/lib/preinit/79_move_config | 2 +- .../base-files/lib/preinit/81_linksys_syscfg | 2 +- .../mvebu/base-files/lib/upgrade/platform.sh | 10 +- .../mvebu/base-files/lib/upgrade/sdcard.sh | 2 +- target/linux/mvebu/image/Makefile | 2 +- target/linux/mvebu/image/cortex-a53.mk | 2 - target/linux/mvebu/image/cortex-a72.mk | 2 - target/linux/mvebu/image/cortex-a9.mk | 20 +++- 18 files changed, 99 insertions(+), 192 deletions(-) delete mode 100755 target/linux/mvebu/base-files/lib/mvebu.sh delete mode 100644 target/linux/mvebu/base-files/lib/preinit/01_sysinfo diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu index 7d16a59666..cd8789c0e9 100644 --- a/package/boot/uboot-envtools/files/mvebu +++ b/package/boot/uboot-envtools/files/mvebu @@ -14,25 +14,25 @@ touch /etc/config/ubootenv board=$(board_name) case "$board" in -armada-385-linksys-caiman|\ -armada-385-linksys-cobra|\ -armada-385-linksys-shelby) - ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000" - ;; -armada-385-linksys-rango|\ -armada-385-linksys-venom) - ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" - ;; -armada-385-turris-omnia) +cznic,turris-omnia) ubootenv_add_uci_config "/dev/mtd0" "0xC0000" "0x10000" "0x40000" ;; -armada-xp-linksys-mamba) - ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000" - ;; globalscale,espressobin|\ marvell,armada8040-mcbin) ubootenv_add_uci_config "/dev/mtd0" "0x3f0000" "0x10000" "0x10000" "1" ;; +linksys,caiman|\ +linksys,cobra|\ +linksys,shelby) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x40000" + ;; +linksys,mamba) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x40000" "0x20000" + ;; +linksys,rango|\ +linksys,venom) + ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000" + ;; esac config_load ubootenv diff --git a/target/linux/mvebu/base-files/etc/board.d/01_leds b/target/linux/mvebu/base-files/etc/board.d/01_leds index ff8d4a21c0..14313ee664 100755 --- a/target/linux/mvebu/base-files/etc/board.d/01_leds +++ b/target/linux/mvebu/base-files/etc/board.d/01_leds @@ -11,42 +11,42 @@ board_config_update board=$(board_name) case "$board" in -armada-385-linksys-caiman) +linksys,caiman) ucidef_set_led_netdev "wan" "WAN" "pca963x:caiman:white:wan" "eth1" ucidef_set_led_usbport "usb1" "USB 1" "pca963x:caiman:white:usb2" "usb1-port1" ucidef_set_led_usbport "usb2" "USB 2" "pca963x:caiman:white:usb3_1" "usb2-port1" "usb3-port1" ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:caiman:white:usb3_2" "usb3-port1" ;; -armada-385-linksys-cobra) +linksys,cobra) ucidef_set_led_netdev "wan" "WAN" "pca963x:cobra:white:wan" "eth1" ucidef_set_led_usbport "usb1" "USB 1" "pca963x:cobra:white:usb2" "usb1-port1" ucidef_set_led_usbport "usb2" "USB 2" "pca963x:cobra:white:usb3_1" "usb2-port1" "usb3-port1" ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:cobra:white:usb3_2" "usb3-port1" ;; -armada-385-linksys-rango) +linksys,mamba) + ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1" + ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1" + ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1" + ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2" + ;; +linksys,rango) ucidef_set_led_netdev "wan" "WAN" "pca963x:rango:white:wan" "eth1" ucidef_set_led_usbport "usb1" "USB 1" "pca963x:rango:white:usb2" "usb1-port1" ucidef_set_led_usbport "usb2" "USB 2" "pca963x:rango:white:usb3_1" "usb2-port1" "usb3-port1" ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:rango:white:usb3_2" "usb3-port1" ;; -armada-385-linksys-shelby) +linksys,shelby) ucidef_set_led_netdev "wan" "WAN" "pca963x:shelby:white:wan" "eth1" ucidef_set_led_usbport "usb1" "USB 1" "pca963x:shelby:white:usb2" "usb1-port1" ucidef_set_led_usbport "usb2" "USB 2" "pca963x:shelby:white:usb3_1" "usb2-port1" "usb3-port1" ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:shelby:white:usb3_2" "usb3-port1" ;; -armada-385-linksys-venom) +linksys,venom) ucidef_set_led_netdev "wan" "WAN" "pca963x:venom:blue:wan" "eth1" ucidef_set_led_usbport "usb1" "USB 1" "pca963x:venom:blue:usb2" "usb1-port1" ucidef_set_led_usbport "usb2" "USB 2" "pca963x:venom:blue:usb3_1" "usb2-port1" "usb3-port1" ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "pca963x:venom:blue:usb3_2" "usb3-port1" ;; -armada-xp-linksys-mamba) - ucidef_set_led_netdev "wan" "WAN" "mamba:white:wan" "eth1" - ucidef_set_led_usbport "usb1" "USB 1" "mamba:white:usb2" "usb1-port1" - ucidef_set_led_usbport "usb2" "USB 2" "mamba:white:usb3_1" "usb2-port1" "usb3-port1" - ucidef_set_led_usbport "usb2_ss" "USB 2 SS" "mamba:white:usb3_2" "usb3-port2" - ;; esac diff --git a/target/linux/mvebu/base-files/etc/board.d/02_network b/target/linux/mvebu/base-files/etc/board.d/02_network index 2c10154925..f099a078b2 100755 --- a/target/linux/mvebu/base-files/etc/board.d/02_network +++ b/target/linux/mvebu/base-files/etc/board.d/02_network @@ -11,24 +11,42 @@ board_config_update board=$(board_name) case "$board" in -armada-385-db-ap) - ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2" +cznic,turris-omnia) + ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4" + ucidef_set_interface_wan "eth2" + ;; +globalscale,espressobin) + ucidef_set_interfaces_lan_wan "lan0 lan1" "wan" ;; -armada-385-linksys-caiman|\ -armada-385-linksys-cobra|\ -armada-385-linksys-rango|\ -armada-385-linksys-shelby|\ -armada-385-linksys-venom|\ -armada-xp-linksys-mamba) +linksys,caiman|\ +linksys,cobra|\ +linksys,mamba|\ +linksys,rango|\ +linksys,shelby|\ +linksys,venom) ucidef_set_interfaces_lan_wan "eth0.1" "eth1.2" ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5@eth0" "4:wan" "6@eth1" ;; -armada-385-turris-omnia) - ucidef_set_interface_lan "lan0 lan1 lan2 lan3 lan4" - ucidef_set_interface_wan "eth2" +marvell,a385-db-ap) + ucidef_set_interfaces_lan_wan "eth0 eth1" "eth2" + ;; +marvell,armada8040-mcbin) + ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2" + ;; +marvell,armada8040-db) + ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1" + ;; +marvell,armada7040-db) + ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1" + ;; +marvell,armada-3720-db) + ucidef_set_interfaces_lan_wan "eth1" "eth0" + ;; +marvell,axp-gp) + ucidef_set_interface_lan "eth0 eth1 eth2 eth3" ;; -armada-388-clearfog-*) +solidrun,clearfog*a1) # eth0 is standalone ethernet # eth1 is switch (-pro) or standalone ethernet (-base) # eth2 is SFP @@ -40,24 +58,6 @@ armada-388-clearfog-*) ucidef_add_switch "switch0" \ "0:lan:5" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5u@eth1" "6:lan:6" ;; -armada-xp-gp) - ucidef_set_interface_lan "eth0 eth1 eth2 eth3" - ;; -globalscale,espressobin) - ucidef_set_interfaces_lan_wan "lan0 lan1" "wan" - ;; -marvell,armada-3720-db) - ucidef_set_interfaces_lan_wan "eth1" "eth0" - ;; -marvell,armada8040-mcbin) - ucidef_set_interfaces_lan_wan "eth0 eth1 eth3" "eth2" - ;; -marvell,armada8040-db) - ucidef_set_interfaces_lan_wan "eth0 eth2 eth3" "eth1" - ;; -marvell,armada7040-db) - ucidef_set_interfaces_lan_wan "eth0 eth2" "eth1" - ;; *) ucidef_set_interface_lan "eth0" ;; diff --git a/target/linux/mvebu/base-files/etc/diag.sh b/target/linux/mvebu/base-files/etc/diag.sh index 327a82df93..be825379f9 100644 --- a/target/linux/mvebu/base-files/etc/diag.sh +++ b/target/linux/mvebu/base-files/etc/diag.sh @@ -7,24 +7,24 @@ get_status_led() { case $(board_name) in - armada-385-linksys-caiman) + linksys,caiman) status_led="caiman:white:power" ;; - armada-385-linksys-cobra) + linksys,cobra) status_led="cobra:white:power" ;; - armada-385-linksys-rango) + linksys,mamba) + status_led="mamba:white:power" + ;; + linksys,rango) status_led="rango:white:power" ;; - armada-385-linksys-shelby) + linksys,shelby) status_led="shelby:white:power" ;; - armada-385-linksys-venom) + linksys,venom) status_led="venom:blue:power" ;; - armada-xp-linksys-mamba) - status_led="mamba:white:power" - ;; esac } diff --git a/target/linux/mvebu/base-files/etc/init.d/linksys_recovery b/target/linux/mvebu/base-files/etc/init.d/linksys_recovery index 520b8aac54..b4f375ec99 100755 --- a/target/linux/mvebu/base-files/etc/init.d/linksys_recovery +++ b/target/linux/mvebu/base-files/etc/init.d/linksys_recovery @@ -7,7 +7,7 @@ boot() { . /lib/functions.sh case $(board_name) in - armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba) + linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom) # make sure auto_recovery in uboot is always on AUTO_RECOVERY_ENA="`fw_printenv -n auto_recovery`" if [ "$AUTO_RECOVERY_ENA" != "yes" ] ; then diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless b/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless index 6fb24c8d4f..3c345ff148 100644 --- a/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless +++ b/target/linux/mvebu/base-files/etc/uci-defaults/03_wireless @@ -11,7 +11,7 @@ board=$(board_name) case "$board" in -armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba) +linksys,caiman|linksys,cobra|linksys,mamba|linksys,shelby|linksys,venom) SKU=$(strings /dev/mtd3|sed -ne 's/^cert_region=//p') WIFIMAC2G=$(macaddr_add $(cat /sys/class/net/eth0/address) +1) WIFIMAC5G=$(macaddr_add $WIFIMAC2G +1) @@ -34,7 +34,7 @@ armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-shelby|arm esac case "$board" in - armada-xp-linksys-mamba) + linksys,mamba) WIFIMAC0=$WIFIMAC2G WIFIMAC1=$WIFIMAC5G ;; diff --git a/target/linux/mvebu/base-files/etc/uci-defaults/04_mambafan b/target/linux/mvebu/base-files/etc/uci-defaults/04_mambafan index e15ce616c7..ec25aedad6 100644 --- a/target/linux/mvebu/base-files/etc/uci-defaults/04_mambafan +++ b/target/linux/mvebu/base-files/etc/uci-defaults/04_mambafan @@ -8,7 +8,7 @@ board=$(board_name) case "$board" in -armada-xp-linksys-mamba) +linksys,mamba) # Set fan script execution in crontab grep -s -q fan_ctrl.sh /etc/crontabs/root && exit 0 diff --git a/target/linux/mvebu/base-files/lib/mvebu.sh b/target/linux/mvebu/base-files/lib/mvebu.sh deleted file mode 100755 index cfe880bb3c..0000000000 --- a/target/linux/mvebu/base-files/lib/mvebu.sh +++ /dev/null @@ -1,94 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2013-2015 OpenWrt.org -# Copyright (C) 2016 LEDE-Project.org -# - -MVEBU_BOARD_NAME= -MVEBU_MODEL= - -mvebu_board_detect() { - local machine - local name - - machine=$(cat /proc/device-tree/model) - - case "$machine" in - *"Marvell Armada 370 Evaluation Board") - name="armada-370-db" - ;; - *"Globalscale Marvell ESPRESSOBin Board") - name="globalscale,espressobin" - ;; - *"Marvell Armada 3720 Development Board DB-88F3720-DDR3") - name="marvell,armada-3720-db" - ;; - *"Marvell 8040 MACCHIATOBin") - name="marvell,armada8040-mcbin" - ;; - *"Marvell Armada 8040 DB board") - name="marvell,armada8040-db" - ;; - *"Marvell Armada 7040 DB board") - name="marvell,armada7040-db" - ;; - *"Globalscale Mirabox") - name="mirabox" - ;; - *"Marvell Armada 370 Reference Design") - name="armada-370-rd" - ;; - *"Marvell Armada XP Evaluation Board") - name="armada-xp-db" - ;; - *"PlatHome OpenBlocks AX3-4 board") - name="openblocks-ax3-4" - ;; - *"Marvell Armada XP GP Board") - name="armada-xp-gp" - ;; - *"Linksys WRT1200AC") - name="armada-385-linksys-caiman" - ;; - *"Linksys WRT1900AC") - name="armada-xp-linksys-mamba" - ;; - *"Linksys WRT1900ACv2") - name="armada-385-linksys-cobra" - ;; - *"Linksys WRT1900ACS") - name="armada-385-linksys-shelby" - ;; - *"Linksys WRT3200ACM") - name="armada-385-linksys-rango" - ;; - *"Linksys WRT32X") - name="armada-385-linksys-venom" - ;; - *"Marvell Armada 385 Access Point Development Board") - name="armada-385-db-ap" - ;; - *"Marvell Armada XP Development Board DB-MV784MP-GP") - name="armada-xp-gp" - ;; - *"SolidRun Clearfog Pro A1") - name="armada-388-clearfog-pro" - ;; - *"SolidRun Clearfog Base A1") - name="armada-388-clearfog-base" - ;; - *"Turris Omnia") - name="armada-385-turris-omnia" - ;; - esac - - [ -z "$name" ] && name="unknown" - - [ -z "$MVEBU_BOARD_NAME" ] && MVEBU_BOARD_NAME="$name" - [ -z "$MVEBU_MODEL" ] && MVEBU_MODEL="$machine" - - [ -e "/tmp/sysinfo/" ] || mkdir -p "/tmp/sysinfo/" - - echo "$MVEBU_BOARD_NAME" > /tmp/sysinfo/board_name - echo "$MVEBU_MODEL" > /tmp/sysinfo/model -} diff --git a/target/linux/mvebu/base-files/lib/preinit/01_sysinfo b/target/linux/mvebu/base-files/lib/preinit/01_sysinfo deleted file mode 100644 index 6f473cfa13..0000000000 --- a/target/linux/mvebu/base-files/lib/preinit/01_sysinfo +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -do_sysinfo_mvebu() { - . /lib/mvebu.sh - - mvebu_board_detect -} - -boot_hook_add preinit_main do_sysinfo_mvebu diff --git a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac index 534a271efb..aba8da239e 100644 --- a/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac +++ b/target/linux/mvebu/base-files/lib/preinit/06_set_iface_mac @@ -9,12 +9,7 @@ preinit_set_mac_address() { . /lib/functions.sh case $(board_name) in - armada-xp-linksys-mamba) - mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) - ip link set dev eth0 address $mac 2>/dev/null - ip link set dev eth1 address $mac 2>/dev/null - ;; - armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom) + linksys,caiman|linksys,cobra|linksys,rango|linksys,shelby|linksys,venom) # rename interfaces back to the way they were with 4.4 case "$(readlink /sys/class/net/eth0)" in *f1070000*) @@ -29,7 +24,12 @@ preinit_set_mac_address() { ip link set dev eth1 address $mac 2>/dev/null ip link set dev eth0 address $mac_wan 2>/dev/null ;; - armada-385-db-ap|armada-388-clearfog) + linksys,mamba) + mac=$(mtd_get_mac_ascii devinfo hw_mac_addr) + ip link set dev eth0 address $mac 2>/dev/null + ip link set dev eth1 address $mac 2>/dev/null + ;; + marvell,a385-db-ap|solidrun,clearfog*a1) # rename interfaces back to the way they were with 4.4 case "$(readlink /sys/class/net/eth0)" in *f1070000*) diff --git a/target/linux/mvebu/base-files/lib/preinit/79_move_config b/target/linux/mvebu/base-files/lib/preinit/79_move_config index f7e23cc324..640fb5cdad 100644 --- a/target/linux/mvebu/base-files/lib/preinit/79_move_config +++ b/target/linux/mvebu/base-files/lib/preinit/79_move_config @@ -9,7 +9,7 @@ move_config() { if export_bootdevice && export_partdevice partdev 1; then case $(board_name) in - armada-385-turris-omnia) + cznic,turris-omnia) insmod nls_cp437 insmod nls_iso8859-1 insmod fat diff --git a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg index cf7a22c4f6..b107eacb11 100644 --- a/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg +++ b/target/linux/mvebu/base-files/lib/preinit/81_linksys_syscfg @@ -8,7 +8,7 @@ preinit_mount_syscfg() { . /lib/functions.sh case $(board_name) in - armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba) + linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom) needs_recovery=0 syscfg_part=$(grep syscfg /proc/mtd |cut -c4) ubiattach -m $syscfg_part || needs_recovery=1 diff --git a/target/linux/mvebu/base-files/lib/upgrade/platform.sh b/target/linux/mvebu/base-files/lib/upgrade/platform.sh index 57b2f00a4c..c3c31ea06f 100755 --- a/target/linux/mvebu/base-files/lib/upgrade/platform.sh +++ b/target/linux/mvebu/base-files/lib/upgrade/platform.sh @@ -9,7 +9,7 @@ REQUIRE_IMAGE_METADATA=1 platform_check_image() { case "$(board_name)" in - armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin) + cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1) platform_check_image_sdcard "$ARGV" ;; *) @@ -20,10 +20,10 @@ platform_check_image() { platform_do_upgrade() { case "$(board_name)" in - armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba) + linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom) platform_do_upgrade_linksys "$ARGV" ;; - armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin) + cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1) platform_do_upgrade_sdcard "$ARGV" ;; *) @@ -33,10 +33,10 @@ platform_do_upgrade() { } platform_copy_config() { case "$(board_name)" in - armada-385-linksys-caiman|armada-385-linksys-cobra|armada-385-linksys-rango|armada-385-linksys-shelby|armada-385-linksys-venom|armada-xp-linksys-mamba) + linksys,caiman|linksys,cobra|linksys,mamba|linksys,rango|linksys,shelby|linksys,venom) platform_copy_config_linksys ;; - armada-385-turris-omnia|armada-388-clearfog-base|armada-388-clearfog-pro|globalscale,espressobin|marvell,armada8040-mcbin) + cznic,turris-omnia|globalscale,espressobin|marvell,armada8040-mcbin|solidrun,clearfog-base-a1|solidrun,clearfog-pro-a1) platform_copy_config_sdcard "$ARGV" ;; esac diff --git a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh index 28fad31757..43fc2504fc 100644 --- a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh +++ b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh @@ -91,7 +91,7 @@ platform_do_upgrade_sdcard() { get_image "$@" | dd of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync case "$board" in - armada-385-turris-omnia) + cznic,turris-omnia) fw_setenv openwrt_bootargs 'earlyprintk console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=auto rootwait' fw_setenv openwrt_mmcload 'setenv bootargs "$openwrt_bootargs cfg80211.freg=$regdomain"; fatload mmc 0 0x01000000 zImage; fatload mmc 0 0x02000000 armada-385-turris-omnia.dtb' fw_setenv factory_mmcload 'setenv bootargs "$bootargs cfg80211.freg=$regdomain"; btrload mmc 0 0x01000000 boot/zImage @; btrload mmc 0 0x02000000 boot/dtb @' diff --git a/target/linux/mvebu/image/Makefile b/target/linux/mvebu/image/Makefile index f432a37911..57e5a30491 100644 --- a/target/linux/mvebu/image/Makefile +++ b/target/linux/mvebu/image/Makefile @@ -76,7 +76,7 @@ define Device/Default IMAGES := sysupgrade.bin IMAGE/factory.img := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | pad-to $$$$(PAGESIZE) IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - SUPPORTED_DEVICES = $$(firstword $$(DEVICE_DTS)) + SUPPORTED_DEVICES = $(subst _,$(comma),$(1)) UBINIZE_OPTS := -E 5 UBOOT := BOOT_SCRIPT := diff --git a/target/linux/mvebu/image/cortex-a53.mk b/target/linux/mvebu/image/cortex-a53.mk index 5a3e9b4d07..de9c2164b1 100644 --- a/target/linux/mvebu/image/cortex-a53.mk +++ b/target/linux/mvebu/image/cortex-a53.mk @@ -4,7 +4,6 @@ define Device/globalscale_espressobin $(call Device/Default-arm64) DEVICE_TITLE := ESPRESSObin (Marvell Armada 3700 Community Board) DEVICE_DTS := armada-3720-espressobin - SUPPORTED_DEVICES := globalscale,espressobin endef TARGET_DEVICES += globalscale_espressobin @@ -12,7 +11,6 @@ define Device/marvell_armada-3720-db $(call Device/Default-arm64) DEVICE_TITLE := Marvell Armada 3720 Development Board DB-88F3720-DDR3 DEVICE_DTS := armada-3720-db - SUPPORTED_DEVICES := marvell,armada-3720-db endef TARGET_DEVICES += marvell_armada-3720-db diff --git a/target/linux/mvebu/image/cortex-a72.mk b/target/linux/mvebu/image/cortex-a72.mk index b1069b1f0b..73dc67b60a 100644 --- a/target/linux/mvebu/image/cortex-a72.mk +++ b/target/linux/mvebu/image/cortex-a72.mk @@ -14,7 +14,6 @@ define Device/marvell_armada8040-db DEVICE_TITLE := Marvell Armada 8040 DB board DEVICE_DTS := armada-8040-db IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata - SUPPORTED_DEVICES := marvell,armada8040-db endef TARGET_DEVICES += marvell_armada8040-db @@ -23,7 +22,6 @@ define Device/marvell_armada7040-db DEVICE_TITLE := Marvell Armada 7040 DB board DEVICE_DTS := armada-7040-db IMAGE/sdcard.img.gz := boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata - SUPPORTED_DEVICES := marvell,armada7040-db endef TARGET_DEVICES += marvell_armada7040-db diff --git a/target/linux/mvebu/image/cortex-a9.mk b/target/linux/mvebu/image/cortex-a9.mk index baaeb8ddb6..401da3afaf 100644 --- a/target/linux/mvebu/image/cortex-a9.mk +++ b/target/linux/mvebu/image/cortex-a9.mk @@ -20,6 +20,7 @@ define Device/linksys_wrt1200ac $(call Device/linksys,WRT1200AC (Caiman)) DEVICE_DTS := armada-385-linksys-caiman DEVICE_PACKAGES += mwlwifi-firmware-88w8864 + SUPPORTED_DEVICES := armada-385-linksys-caiman linksys,caiman endef TARGET_DEVICES += linksys_wrt1200ac @@ -27,6 +28,7 @@ define Device/linksys_wrt1900acv2 $(call Device/linksys,WRT1900ACv2 (Cobra)) DEVICE_DTS := armada-385-linksys-cobra DEVICE_PACKAGES += mwlwifi-firmware-88w8864 + SUPPORTED_DEVICES := armada-385-linksys-cobra linksys,cobra endef TARGET_DEVICES += linksys_wrt1900acv2 @@ -34,6 +36,7 @@ define Device/linksys_wrt3200acm $(call Device/linksys,WRT3200ACM (Rango)) DEVICE_DTS := armada-385-linksys-rango DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 + SUPPORTED_DEVICES := armada-385-linksys-rango linksys,rango endef TARGET_DEVICES += linksys_wrt3200acm @@ -41,6 +44,7 @@ define Device/linksys_wrt1900acs $(call Device/linksys,WRT1900ACS (Shelby)) DEVICE_DTS := armada-385-linksys-shelby DEVICE_PACKAGES += mwlwifi-firmware-88w8864 + SUPPORTED_DEVICES := armada-385-linksys-shelby linksys,shelby endef TARGET_DEVICES += linksys_wrt1900acs @@ -50,6 +54,7 @@ define Device/linksys_wrt32x DEVICE_PACKAGES += kmod-btmrvl kmod-mwifiex-sdio mwlwifi-firmware-88w8964 KERNEL_SIZE := 3072k KERNEL := kernel-bin | append-dtb + SUPPORTED_DEVICES := armada-385-linksys-venom linksys,venom endef TARGET_DEVICES += linksys_wrt32x @@ -58,12 +63,13 @@ define Device/linksys_wrt1900ac DEVICE_DTS := armada-xp-linksys-mamba DEVICE_PACKAGES += mwlwifi-firmware-88w8864 KERNEL_SIZE := 3072k + SUPPORTED_DEVICES := armada-xp-linksys-mamba linksys,mamba endef TARGET_DEVICES += linksys_wrt1900ac define Device/plathome_openblocks-ax3-4 DEVICE_DTS := armada-xp-openblocks-ax3-4 - SUPPORTED_DEVICES := openblocks-ax3-4 + SUPPORTED_DEVICES += openblocks-ax3-4 BLOCKSIZE := 128k PAGESIZE := 1 IMAGES += factory.img @@ -78,6 +84,7 @@ define Device/marvell_a385-db-ap IMAGES += factory.img KERNEL_SIZE := 8192k DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP) + SUPPORTED_DEVICES += armada-385-db-ap endef TARGET_DEVICES += marvell_a385-db-ap @@ -85,6 +92,7 @@ define Device/marvell_a370-db $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada 370 DB (DB-88F6710-BP-DDR3) DEVICE_DTS := armada-370-db + SUPPORTED_DEVICES += armada-370-db endef TARGET_DEVICES += marvell_a370-db @@ -92,6 +100,7 @@ define Device/marvell_a370-rd $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada 370 RD (RD-88F6710-A1) DEVICE_DTS := armada-370-rd + SUPPORTED_DEVICES += armada-370-rd endef TARGET_DEVICES += marvell_a370-rd @@ -99,6 +108,7 @@ define Device/marvell_axp-db $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada XP DB (DB-78460-BP) DEVICE_DTS := armada-xp-db + SUPPORTED_DEVICES += armada-xp-db endef TARGET_DEVICES += marvell_axp-db @@ -106,6 +116,7 @@ define Device/marvell_axp-gp $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada XP GP (DB-MV784MP-GP) DEVICE_DTS := armada-xp-gp + SUPPORTED_DEVICES += armada-xp-gp endef TARGET_DEVICES += marvell_axp-gp @@ -114,6 +125,7 @@ define Device/marvell_a388-rd DEVICE_DTS := armada-388-rd IMAGES := firmware.bin IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs + SUPPORTED_DEVICES := armada-388-rd marvell,a385-rd endef TARGET_DEVICES += marvell_a388-rd @@ -125,7 +137,7 @@ define Device/solidrun_clearfog-pro-a1 IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base - SUPPORTED_DEVICES := armada-388-clearfog-pro armada-388-clearfog + SUPPORTED_DEVICES += armada-388-clearfog armada-388-clearfog-pro UBOOT := clearfog-u-boot-spl.kwb BOOT_SCRIPT := clearfog endef @@ -139,6 +151,7 @@ define Device/solidrun_clearfog-base-a1 IMAGES := sdcard.img.gz IMAGE/sdcard.img.gz := boot-scr | boot-img-ext4 | sdcard-img-ext4 | gzip | append-metadata DEVICE_DTS := armada-388-clearfog-base armada-388-clearfog-pro + SUPPORTED_DEVICES += armada-388-clearfog-base UBOOT := clearfog-u-boot-spl.kwb BOOT_SCRIPT := clearfog endef @@ -147,7 +160,7 @@ TARGET_DEVICES += solidrun_clearfog-base-a1 define Device/globalscale_mirabox $(Device/NAND-512K) DEVICE_DTS := armada-370-mirabox - SUPPORTED_DEVICES := mirabox + SUPPORTED_DEVICES += mirabox DEVICE_TITLE := Globalscale Mirabox endef TARGET_DEVICES += globalscale_mirabox @@ -166,6 +179,7 @@ define Device/cznic_turris-omnia IMAGE/omnia-medkit-$$(IMAGE_PREFIX)-initramfs.tar.gz := omnia-medkit-initramfs | gzip IMAGE_NAME = $$(2) DEVICE_DTS := armada-385-turris-omnia + SUPPORTED_DEVICES += armada-385-turris-omnia endef TARGET_DEVICES += cznic_turris-omnia From patchwork Sat May 11 17:37:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1098443 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="C71SWoI0"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="SVJe6wr6"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 451Z844LHlz9s6w for ; Sun, 12 May 2019 03:39:16 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date: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=e5UXzmg1n3P7BqflkHUEsAtJ5CdOQgFxoOLSq3bBoDI=; b=C71SWoI0JDKDofzxcwhiI1AXR0 w20GZSSNtEFnEozBSb/dNOxTJcwRBeGDl9RdKehnIK36uQsaLpMWm/vNf6KmqlXI6i9OUzGTjvn/L mUa3Ls+wHwKyPcYv2K3CwBDUafhD1P+a4u4GJUyJusfIQDEMnlbPxEjRYn6IthOJYk23j5NMm3h60 HeWlxabSCHSVxXcT2KicK1Jy+Mt3JuKmlqIxOc32kcQ+WcESVlCzNnFx7sx410sWmZo0pbDQ7z0Ow qAhfoR0tCX6FJsCx5CVefguxa/A4XZ51p/lv1FvS1XLb49lnYhMZxkRoULOnM2+RQ9f966M8uRcjH +NDyAMPw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVxg-0007cB-Bj; Sat, 11 May 2019 17:39:04 +0000 Received: from mx-out.tlen.pl ([193.222.135.158]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hPVwY-0005rF-BR for openwrt-devel@lists.openwrt.org; Sat, 11 May 2019 17:38:03 +0000 Received: (wp-smtpd smtp.tlen.pl 19457 invoked from network); 11 May 2019 19:37:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557596271; bh=R0yTNg1HwM1cjQjrPGY2zFuN3b844npJb9R+EvlP7NQ=; h=From:To:Subject; b=SVJe6wr6WWoOT45ZuJzpfDCrlxj9o/Bi1rcGZSeWDvLqhExPHuZpn2BjkY0ZSw8Ec +Q1sW/wGE1dFO2GZF1dHdPW7+PlxWfJM3HKDkdg+xpYM6X5JaQns/Ns8IdyVRXC2at 8CY6Rgu8YmTr+CyQpk7d6nGne2vRWdsoV906XhL4= Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 11 May 2019 19:37:51 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sat, 11 May 2019 19:37:35 +0200 Message-Id: <20190511173735.5549-9-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190511173735.5549-1-tomek_n@o2.pl> References: <20190511173735.5549-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: be2f5b6ac15cbf06afab295a5a845967 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [UdMU] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190511_103754_827618_D40FB630 X-CRM114-Status: GOOD ( 18.21 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH v3 8/8] mvebu: add images for additional ESPRESSObin boards X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: 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 commit adds support for different iterations of ESPRESSObin. The added variants are: ESPRESSObin with soldered eMMC, ESPRESSObin V7, compared to V5 some passive elements changed and ethernet ports labels positions have been reversed, ESPRESSObin V7 with soldered eMMC. Please refer to: 584d7c5 ("mvebu: new subtarget cortex A53") for instruction how to boot OpenWrt image placed on SD card. It is advised for owners of V5 and previous with bootloader based on U-Boot 2015.01, to upgrade the latest version available at: http://espressobin.net/tech-spec. Signed-off-by: Tomasz Maciej Nowak --- .../marvell/armada-3720-espressobin-emmc.dts | 28 +++++++++++ .../armada-3720-espressobin-v7-emmc.dts | 43 ++++++++++++++++ .../marvell/armada-3720-espressobin-v7.dts | 31 ++++++++++++ target/linux/mvebu/image/cortex-a53.mk | 21 ++++++++ ...l-armada37xx-Add-emmc-sdio-pinctrl-d.patch | 40 +++++++++++++++ ...l-armada-37xx-Enable-emmc-on-espress.patch | 49 +++++++++++++++++++ ...da-3720-espressobin-correct-spi-node.patch | 2 +- ...l-armada-3720-espressobin-add-ports-.patch | 26 ++++++++++ 8 files changed, 239 insertions(+), 1 deletion(-) create mode 100644 target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts create mode 100644 target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts create mode 100644 target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts create mode 100644 target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch create mode 100644 target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch create mode 100644 target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch diff --git a/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts new file mode 100644 index 0000000000..ef90a1bd38 --- /dev/null +++ b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-emmc.dts @@ -0,0 +1,28 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for Globalscale Marvell ESPRESSOBin Board with eMMC + * Copyright (C) 2018 Marvell + * + * Romain Perier + * Konstantin Porotchkin + * + */ + +#include "armada-3720-espressobin.dts" + +/ { + model = "Globalscale Marvell ESPRESSOBin Board (eMMC)"; + compatible = "globalscale,espressobin-emmc", "globalscale,espressobin", + "marvell,armada3720", "marvell,armada3710"; +}; + +&sdhci0 { + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + mmccard: mmccard@0 { + compatible = "mmc-card"; + reg = <0>; + }; +}; diff --git a/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts new file mode 100644 index 0000000000..2b565ca8d8 --- /dev/null +++ b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7-emmc.dts @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for Globalscale Marvell ESPRESSOBin Board V7 with eMMC + * Copyright (C) 2018 Marvell + * + * Romain Perier + * Konstantin Porotchkin + * + */ + +#include "armada-3720-espressobin.dts" + +/ { + model = "Globalscale Marvell ESPRESSOBin Board V7 (eMMC)"; + compatible = "globalscale,espressobin-v7-emmc", "globalscale,espressobin-v7", + "globalscale,espressobin", "marvell,armada3720", + "marvell,armada3710"; +}; + +&ports { + port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&switch0phy0>; + }; + + port@3 { + reg = <3>; + label = "wan"; + phy-handle = <&switch0phy2>; + }; +}; + +&sdhci0 { + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + mmccard: mmccard@0 { + compatible = "mmc-card"; + reg = <0>; + }; +}; diff --git a/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts new file mode 100644 index 0000000000..8a408c3c48 --- /dev/null +++ b/target/linux/mvebu/files-4.14/arch/arm64/boot/dts/marvell/armada-3720-espressobin-v7.dts @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Device Tree file for Globalscale Marvell ESPRESSOBin Board V7 + * Copyright (C) 2018 Marvell + * + * Romain Perier + * Konstantin Porotchkin + * + */ + +#include "armada-3720-espressobin.dts" + +/ { + model = "Globalscale Marvell ESPRESSOBin Board V7"; + compatible = "globalscale,espressobin-v7", "globalscale,espressobin", + "marvell,armada3720", "marvell,armada3710"; +}; + +&ports { + port@1 { + reg = <1>; + label = "lan1"; + phy-handle = <&switch0phy0>; + }; + + port@3 { + reg = <3>; + label = "wan"; + phy-handle = <&switch0phy2>; + }; +}; diff --git a/target/linux/mvebu/image/cortex-a53.mk b/target/linux/mvebu/image/cortex-a53.mk index de9c2164b1..d7014d6f02 100644 --- a/target/linux/mvebu/image/cortex-a53.mk +++ b/target/linux/mvebu/image/cortex-a53.mk @@ -7,6 +7,27 @@ define Device/globalscale_espressobin endef TARGET_DEVICES += globalscale_espressobin +define Device/globalscale_espressobin-emmc + $(call Device/Default-arm64) + DEVICE_TITLE := ESPRESSObin eMMC (Marvell Armada 3700 Community Board) + DEVICE_DTS := armada-3720-espressobin-emmc +endef +TARGET_DEVICES += globalscale_espressobin-emmc + +define Device/globalscale_espressobin-v7 + $(call Device/Default-arm64) + DEVICE_TITLE := ESPRESSObin V7 (Marvell Armada 3700 Community Board) + DEVICE_DTS := armada-3720-espressobin-v7 +endef +TARGET_DEVICES += globalscale_espressobin-v7 + +define Device/globalscale_espressobin-v7-emmc + $(call Device/Default-arm64) + DEVICE_TITLE := ESPRESSObin V7 eMMC (Marvell Armada 3700 Community Board) + DEVICE_DTS := armada-3720-espressobin-v7-emmc +endef +TARGET_DEVICES += globalscale_espressobin-v7-emmc + define Device/marvell_armada-3720-db $(call Device/Default-arm64) DEVICE_TITLE := Marvell Armada 3720 Development Board DB-88F3720-DDR3 diff --git a/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch b/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch new file mode 100644 index 0000000000..19702a61ed --- /dev/null +++ b/target/linux/mvebu/patches-4.14/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch @@ -0,0 +1,40 @@ +From eefe328439642101774f0f5c4ea0dc6ba1cfb687 Mon Sep 17 00:00:00 2001 +From: Ding Tao +Date: Fri, 26 Oct 2018 11:50:27 +0000 +Subject: [PATCH] arm64: dts: marvell: armada37xx: Add emmc/sdio pinctrl + definition + +Add emmc/sdio pinctrl definition for marvell armada37xx SoCs. + +Signed-off-by: Ding Tao +Signed-off-by: Gregory CLEMENT +--- + arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi ++++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi +@@ -218,6 +218,11 @@ + groups = "uart2"; + function = "uart"; + }; ++ ++ mmc_pins: mmc-pins { ++ groups = "emmc_nb"; ++ function = "emmc"; ++ }; + }; + + nb_pm: syscon@14000 { +@@ -247,6 +252,11 @@ + function = "mii"; + }; + ++ sdio_pins: sdio-pins { ++ groups = "sdio_sb"; ++ function = "sdio"; ++ }; ++ + }; + + eth0: ethernet@30000 { diff --git a/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch b/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch new file mode 100644 index 0000000000..26d090f050 --- /dev/null +++ b/target/linux/mvebu/patches-4.14/514-arm64-dts-marvell-armada-37xx-Enable-emmc-on-espress.patch @@ -0,0 +1,49 @@ +From 43ebc7c1b3ed8198b9acf3019eca16e722f7331c Mon Sep 17 00:00:00 2001 +From: Ding Tao +Date: Fri, 26 Oct 2018 11:50:28 +0000 +Subject: [PATCH] arm64: dts: marvell: armada-37xx: Enable emmc on espressobin + +The ESPRESSObin board has a emmc interface available on U11: declare it +and let the bootloader enable it if the emmc is present. + +[gregory.clement@bootlin.com: disable the emmc by default] +Signed-off-by: Ding Tao +Signed-off-by: Gregory CLEMENT +--- + .../dts/marvell/armada-3720-espressobin.dts | 22 +++++++++++++++++++ + 1 file changed, 22 insertions(+) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -93,9 +93,31 @@ + cd-gpios = <&gpionb 3 GPIO_ACTIVE_LOW>; + marvell,pad-type = "sd"; + vqmmc-supply = <&vcc_sd_reg1>; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&sdio_pins>; + status = "okay"; + }; + ++/* U11 */ ++&sdhci0 { ++ non-removable; ++ bus-width = <8>; ++ mmc-ddr-1_8v; ++ mmc-hs400-1_8v; ++ marvell,xenon-emmc; ++ marvell,xenon-tun-count = <9>; ++ marvell,pad-type = "fixed-1-8v"; ++ ++ pinctrl-names = "default"; ++ pinctrl-0 = <&mmc_pins>; ++/* ++ * This eMMC is not populated on all boards, so disable it by ++ * default and let the bootloader enable it, if it is present ++ */ ++ status = "disabled"; ++}; ++ + &spi0 { + status = "okay"; + diff --git a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch index 1d2bdfca75..fc7cb2af1e 100644 --- a/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch +++ b/target/linux/mvebu/patches-4.14/521-arm64-dts-armada-3720-espressobin-correct-spi-node.patch @@ -29,7 +29,7 @@ Signed-off-by: Tomasz Maciej Nowak --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts -@@ -101,25 +101,9 @@ +@@ -123,25 +123,9 @@ flash@0 { reg = <0>; diff --git a/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch b/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch new file mode 100644 index 0000000000..d0103bba19 --- /dev/null +++ b/target/linux/mvebu/patches-4.14/522-arm64-dts-marvell-armada-3720-espressobin-add-ports-.patch @@ -0,0 +1,26 @@ +From 6ea9a1ee9367fb35acff1c08a0dc4213ff4687a0 Mon Sep 17 00:00:00 2001 +From: Tomasz Maciej Nowak +Date: Tue, 9 Apr 2019 15:53:42 +0200 +Subject: [PATCH] arm64: dts: marvell: armada-3720-espressobin: add ports + phandle + +Instead of referencing the whole mdio node, add ports phandle to adjust +port labels in dts for different hardware iterations of ESPRESSObin +boards. + +Signed-off-by: Tomasz Maciej Nowak +--- + arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts ++++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts +@@ -153,7 +153,7 @@ + + dsa,member = <0 0>; + +- ports { ++ ports: ports { + #address-cells = <1>; + #size-cells = <0>; +