From patchwork Thu May 9 13:26:22 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: 1097505 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="MmeaDhiF"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="hA6hFswf"; 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 450DfQ4wyBz9s9T for ; Thu, 9 May 2019 23:27: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=MmeaDhiF+vGS2rOCni5uU7uRFk /vplfKf5g6FJKIFDBFNnz5a2uk9UXs1kaIJUmlTbskp934TgI0yDYc7GM+6pbUgILMN1hQrqYRZyN DNN2LibXKYiFH5GJtXU4xU6SapKxl21gXrlrXTdlgnO0gkmFSdK3Lo8UM/fsKV6ve7CD1hafTY7Ce 4INUl4cCHSQFev8Y1393nH8LtcAjZDXmfEfe8VnArGG33KVm7ocmS5N0V2I8LcuPtkdzelCPwQEYa lCRvxiMB+PCQmoF2RUCk3F5lxr1/LGUGxZpnPxns6O7NzTbQsTr22Q19d8q6Pi83s9xLtaV/27f+A Jt2z8YsA==; 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 1hOj4t-0006Mp-56; Thu, 09 May 2019 13:27:15 +0000 Received: from mx-out.tlen.pl ([193.222.135.148]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOj4Y-0005wH-Ph for openwrt-devel@lists.openwrt.org; Thu, 09 May 2019 13:26:56 +0000 Received: (wp-smtpd smtp.tlen.pl 14429 invoked from network); 9 May 2019 15:26:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557408409; bh=XCw8Hi0ExXOO8e6aO1Yi5k00aloF3xeAUUxLtCsjx+o=; h=From:To:Subject; b=hA6hFswfCE5YU0y49CavGLDzWHHrTK96yM2nRVpaYLYJKnfgNBg86PuDb7rGFXjE6 j60kCHPKxaO5iQzZluNM88yRWd6wU9f+SbBseuFabF6LzdltVvJyKQAq4xYNQFy8td x31ZyYr/pVaryOKfCP4ZPDZhEIGFJ9Az4JZ8cHXk= 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 ; 9 May 2019 15:26:49 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 9 May 2019 15:26:22 +0200 Message-Id: <20190509132628.4671-3-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190509132628.4671-1-tomek_n@o2.pl> References: <20190509132628.4671-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 3629984b0d0693723cdbb13ea86838cb X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [YQNU] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_062654_988889_C5D87A19 X-CRM114-Status: UNSURE ( 6.62 ) 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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH v2 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 Thu May 9 13:26:23 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: 1097504 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="M8FCOwNd"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="cJlkIHqG"; 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 450DfF5gXXz9s9T for ; Thu, 9 May 2019 23:27:17 +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=M8FCOwNd1hDZjBTYUpjzlPtWvI 1ECEMRXQd2E0mjL29VffhlIeM96RTMEorJMSZgwg6h75wdDiX2jRJYa++Yh2xn5M9bbL7BA0p0sbb VnbhboU3GIAU1NwXBtkuTsnDIqgRcCpMw9e8x3+AEJyQ7hqXXZXcSd2RYSnIC1CoW3SK60hOA0IbC gPRJDq03myKwBhXJHyCWpuVjWwmICOEpMPkVO2wXrn7ll8Yal24R5Q2rWil4NK1NMWEtToBqsUmRH WtUEq9w7l6OA8a+C1wF48D8Oewi54F9m6fvjNi964iYJk6NBitxbhQ8lGBV8Xso1aaDEYsjD/E8bO PESPH0sQ==; 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 1hOj4i-000668-NG; Thu, 09 May 2019 13:27:04 +0000 Received: from mx-out.tlen.pl ([193.222.135.148]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOj4Y-0005wJ-40 for openwrt-devel@lists.openwrt.org; Thu, 09 May 2019 13:26:55 +0000 Received: (wp-smtpd smtp.tlen.pl 18257 invoked from network); 9 May 2019 15:26:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557408412; bh=l2dauDLlZQtoiwW6tu13n/n4oZhupfmP0aelTS6R06E=; h=From:To:Subject; b=cJlkIHqGdRI0hLIXdeSfLVzK0wMmdqxQC+iES6RArzRV8FxPSMp4xRr2ZNsJlDTRm Xg2kApbn89SpqfTS6ohRdx4GDDc1fYQ3w34zrxmxqtOoJG3G7GfeKwfnbQa5H0YzsZ 7Ct0SVn8bJZxE7K7V9wH3BwOpzEVNfwK9JdJ7PxQ= 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 ; 9 May 2019 15:26:51 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 9 May 2019 15:26:23 +0200 Message-Id: <20190509132628.4671-4-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190509132628.4671-1-tomek_n@o2.pl> References: <20190509132628.4671-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: aa8ad6cb68e51dc80d962daa1a231f69 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [0bO0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_062654_321945_8E911868 X-CRM114-Status: GOOD ( 11.48 ) 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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH v2 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 Thu May 9 13:26:24 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: 1097506 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="DA5oNrQ9"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="W9kVEQBO"; 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 450Dfg6Q39z9s7h for ; Thu, 9 May 2019 23:27:39 +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=DA5oNrQ9TSAfqRL9MVjkpG2Kjb q3zXHTFdZDB7+ALVTvGcjtl8o1XTqdCaQvcnN5++sKlYINKWPxFXhjE5mFSLKbV5vPFXfmd4240Ab odujPrIzW7iHKf7iJOvP/FPdQrNzZc9vQtL8/c/M6MJROJjGyWra/Si0Z9XsGMPRI2oqEgmuPzrMe ezzRFKAUeXDQunvvuNe4b7pafIl6anzB8wTxQK8xJwY1r6aL0EyjLtkQsZ1xupaP8huj2GFHFDpza ixIrVb5PbP5TOKlfPtQbs0+Ixp0+qIaGOn6t/Fp0Rg0xLcnZK/EVzoHvpVrKXag67rYtj98Nr2Mjs 1iENOHBg==; 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 1hOj54-0006ch-B8; Thu, 09 May 2019 13:27:26 +0000 Received: from mx-out.tlen.pl ([193.222.135.148]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOj4a-0005wY-Vb for openwrt-devel@lists.openwrt.org; Thu, 09 May 2019 13:27:01 +0000 Received: (wp-smtpd smtp.tlen.pl 19839 invoked from network); 9 May 2019 15:26:52 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557408413; bh=ObPoMDrMC0tkL4+EpMcxCCLPMUmgjIlHq39ofGUn0cw=; h=From:To:Subject; b=W9kVEQBOK/WYRmqizBlD6lyP51siYg8wmEzdXhA8vLsAg4P5r7yxsjZACeIZD3pG8 55ZotX870nKpqHID45PLG75qxF2HL5XI8Vevy7+nY1vNukKusieN8oRSYjatDWih7r GPv3a/zJO6eIZFAjOq31Mlm+nGJsUBVQ/nhRPyT8= 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 ; 9 May 2019 15:26:52 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 9 May 2019 15:26:24 +0200 Message-Id: <20190509132628.4671-5-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190509132628.4671-1-tomek_n@o2.pl> References: <20190509132628.4671-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: dde86e3ee76009ab145e466d600dbf4f X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [YWNE] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_062657_450919_0F9F4541 X-CRM114-Status: UNSURE ( 6.08 ) 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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH v2 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 Thu May 9 13:26:25 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: 1097507 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="Zvdb5uMW"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="xedk0n8F"; 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 450Dfx51L2z9s9T for ; Thu, 9 May 2019 23:27:53 +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=Zvdb5uMWIsNUjdhpvCfD3ca/i4 t+pEKyfh01ldVFowaC1N51IU1G38+lolE2HLsW5VmaH31zFuCTBIV4KS1eX9naB+cepSdCl/TJNWi sdqZWfmFokw30MJ1Q1lwS+z1c4nCOVj/L4Kp02zqXVCLNGXiyDst/UzViK5fZa2EKx61Q0fYC7yWw Nb9cnAkiJZWwGWsr4jiGiitOOplAseWdH0C/PxiF/c0cTymuBhiDpbaqgUv+j0mdANVhTSIBGIy8D PgSeXgWsJARbcBseMYt+30uA7Y+8ftFf2reBZbSRn8oNg+5ygDvVvl4QeMHk/041+yCRgFIA/3i+u 8YzhQCgw==; 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 1hOj5F-0006yg-VR; Thu, 09 May 2019 13:27:38 +0000 Received: from mx-out.tlen.pl ([193.222.135.148]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOj4c-0005x6-TP for openwrt-devel@lists.openwrt.org; Thu, 09 May 2019 13:27:03 +0000 Received: (wp-smtpd smtp.tlen.pl 22058 invoked from network); 9 May 2019 15:26:54 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557408414; bh=Dlzt0wlpqW9TfEj4dNSVn8ZdNSMYrjKZMSlTKTcXTf0=; h=From:To:Subject; b=xedk0n8FngLrXZTod6SbYFsO7r9Tx1GZJpN8PGssKbne2GfYttANHZPMKB0ccEFqP EZGPYCnY0eTaBO6b4Up3A1L0K5+dMSplTCFakFjgeNMUReJ+STyg9PdqDHeW6wWNHZ YAQM6Hn8z3YfuVRCAFtAQn+yKIwNvnL7SxNw99V0= 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 ; 9 May 2019 15:26:54 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 9 May 2019 15:26:25 +0200 Message-Id: <20190509132628.4671-6-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190509132628.4671-1-tomek_n@o2.pl> References: <20190509132628.4671-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 59af802afd90abb56a8ba353cbd0e6a2 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [UaME] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_062659_270506_A27D4F9D X-CRM114-Status: UNSURE ( 6.81 ) 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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH v2 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 Thu May 9 13:26:26 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: 1097511 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="KbW/axHO"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="Qz6Q4CBu"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="ZdAMfEJT"; 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 450Dgf5fc5z9s9T for ; Thu, 9 May 2019 23:28:30 +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=KbW/axHOQi82HZtejSawF8wV/Z Q2LMUhpqBVYNr0Ddhrs7N/MdYwHl9HDaknhN46DtH3LYHOUyH+DUaDy58wF4NOSzYdERX869xCDL9 wbhfAon+pZULF/yB5Kuf12F5qur4jEph7e0Cz9iVpEKnm1a9f8+1jeJNN5KG/8ygQs3EhmbBFuf5e qnsrZl8f2LHIoFwIHbMuVio1f6zPH/My88a31pK6YrreIkLX2HpjcveYj6BdzS6Eri12gvU6hIr+t uMjTFU7Sjaz4owE0gVW0K4HEZxdUjuqNlJLneh6jnSZMr9LSej/oc9MDA4y4NxWlFrh3yHhrjLFvs hzIldyeg==; 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 1hOj5w-00080N-54; Thu, 09 May 2019 13:28:20 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOj5H-0006zv-Oa for openwrt-devel@bombadil.infradead.org; Thu, 09 May 2019 13:27:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=05dfMlB4hCMSjZ8+/izERifrIgFXjGOhzFLVVvf6gv8=; b=Qz6Q4CBu6gIAi/LUAM5dqpUjf+ p4mpNXuBxmQLsVDIRtcmJE9QuE/AGhjSxmXerju4VCVYuYRQjjqTJI+2tO310WR/2PLCdT26c9WZd 8fxQk7N1jEukUE/3E5vTSfjwgjZgY1ZAIxELMmbxn936Dz6aB8dPw3XeJ60EVAln0Raq3iFPJ1P2e uGtbiRmOGRQWp1bsoou0EAA9IVJwl+hgSxDeiFI0siq3MaCXeQxLkcDef0Vb0+ARZnItJwQGC9Ymu eGzXXraEPkNUKFmYyeuFpsM6500o6rlk8Uqfm8x8pGGbuikYa6aYRDFGvgr5qZoUY5jazqLIyhXRC oaYV7ipw==; Received: from mx-out.tlen.pl ([193.222.135.148]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOj5E-0003PH-V1 for openwrt-devel@lists.openwrt.org; Thu, 09 May 2019 13:27:37 +0000 Received: (wp-smtpd smtp.tlen.pl 24794 invoked from network); 9 May 2019 15:26:56 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557408416; bh=05dfMlB4hCMSjZ8+/izERifrIgFXjGOhzFLVVvf6gv8=; h=From:To:Subject; b=ZdAMfEJTjjEDDpWaTPuplpxp8O3CmfD4GV1l3lvZWh3jymOm/gwSrujahlETyKknE xW4MgfV6la2mjRjQkubd21WomZUWXHn0DVA8Oa7RozlS/zQM4PbwSMriFne4zJisRw PXnLIq14FBaxdT+0PZ15zVs7QtCl3xUwabZFx7HM= 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 ; 9 May 2019 15:26:56 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 9 May 2019 15:26:26 +0200 Message-Id: <20190509132628.4671-7-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190509132628.4671-1-tomek_n@o2.pl> References: <20190509132628.4671-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 210aa794d53f932bde423f5a9bce5adc X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [AYOU] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_092737_132866_43736D49 X-CRM114-Status: UNSURE ( 7.49 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on merlin.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_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH v2 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 Thu May 9 13:26:27 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: 1097509 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="hxS4E+XL"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="ZOAxK+fz"; 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 450DgD59B2z9s9T for ; Thu, 9 May 2019 23:28:08 +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=cm0PcF6qVNdh5YjpBtMdxL7+5mT8vmDfig0sNHi5t7c=; b=hxS4E+XLpYSzGGHvPxc8Gjhcr0 StJePD/QLYJB3W/AphXBZmZAaTjEmAw1RNGhxHrg/iaf9ma8SmSFnhBRmbhVH8VdWWLDBqWuTydZ9 SzZqnCimm+S2Tkl32yZHRXP7no2KxDgP22AXDWEMYcXfxk/cbWgwEaTfuGnDW1pexNQMZzlKaC3xL ZmbwI92CTaUJoIeaneLD2qcplbd+Dzxa75BsTmEH+fC3pyCxFQGTBObS6+udq49hbhkcbVXypqqV9 QXtKbTKZk/iIc9k7qT8w3Ip/yKQjemzKTsspMafv6MWZMw3Qy1E/qi3IYUm+0HDRllwK3lCfHQWtP XbrRFrmg==; 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 1hOj5a-0007TJ-3F; Thu, 09 May 2019 13:27:58 +0000 Received: from mx-out.tlen.pl ([193.222.135.148]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOj4n-0006CE-PK for openwrt-devel@lists.openwrt.org; Thu, 09 May 2019 13:27:27 +0000 Received: (wp-smtpd smtp.tlen.pl 31327 invoked from network); 9 May 2019 15:27:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557408421; bh=zyOdicVByqkbNIfwxVzUYUYDaWs2GnHJDH+xeQYuAt0=; h=From:To:Subject; b=ZOAxK+fziq8WWw8VWwHkl5gnmoBfJ2uGnd8sifWblmQqyJSNU18gUhzcZu5Kq4tb0 wbVzCcm1hSIEsj7PRU2YqiEcnC5XdiBgygL22MFPHSzClmgxeMHDKSMOVVPHr8LYa6 FeK6YPiIwNzho5Yjhe4tozNjNE8H6icW/2SM+m/I= 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 ; 9 May 2019 15:27:00 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 9 May 2019 15:26:27 +0200 Message-Id: <20190509132628.4671-8-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190509132628.4671-1-tomek_n@o2.pl> References: <20190509132628.4671-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: a4bd4b4cccb90e1d8f57963487c04129 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [sQNk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_062711_175321_97C1547B X-CRM114-Status: GOOD ( 10.00 ) 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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH v2 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 --- .../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 +++- 17 files changed, 86 insertions(+), 179 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/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 Thu May 9 13:26: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: 1097508 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="VFun6jPN"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="haYW6Jtr"; 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 450Dg22rWcz9s9T for ; Thu, 9 May 2019 23:27:58 +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=VFun6jPNxHy/ORsyo7mPNlb8N0 vTWszGBxLfJtBdmuTpX3VDPrqM2kyZU/vMzuFE20rFgp8IWSEGrWcxCz8veufPmSsXql8nyUvcJ4k rMlK5z0DgUh/b20263W4tgw2TY4qVTC0KJ/p5c4mVfj/Zd3z13chFyDoPrsQzgrHwDGSAQ5aRoY0q cv2eX33L6+e76K6HVPm4ZgAnSGV7aTw29V1OV5MbEr+WjKlfPL5TTrAWNG3QaGjL9S9ALjMhDV9Xd IXn6vbB+rC487yuK0Ob3fFtoZ23/DWp0VDStekHk5c7NtGqsJq4AeYJIHuEOg+hqNuYHDE2G3xH6r RuDwQuaw==; 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 1hOj5Q-0007EL-C2; Thu, 09 May 2019 13:27:48 +0000 Received: from mx-out.tlen.pl ([193.222.135.148]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hOj4m-0006AT-8v for openwrt-devel@lists.openwrt.org; Thu, 09 May 2019 13:27:18 +0000 Received: (wp-smtpd smtp.tlen.pl 4002 invoked from network); 9 May 2019 15:27:03 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1557408424; bh=R0yTNg1HwM1cjQjrPGY2zFuN3b844npJb9R+EvlP7NQ=; h=From:To:Subject; b=haYW6Jtr5hIFOp8ukDNSpcLpglbthSbS13xPG+UtT5bjBgB/mmy5mrZp3XVBKSsGu ceaWW/dVjE/yl/cvg8FFb6tcaUPnHPP44nV4ZVW5qcjXoYq4+4f4Mpk4Y+df/6DWGZ Fg+QVmaXbY9ngDmD0TYPRdYKiyqxsW2cbf5D6E8o= 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 ; 9 May 2019 15:27:03 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Thu, 9 May 2019 15:26:28 +0200 Message-Id: <20190509132628.4671-9-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190509132628.4671-1-tomek_n@o2.pl> References: <20190509132628.4671-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 736748b494c4e9d36ba258e54deabb83 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [IdMk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190509_062709_076099_4D2988CB X-CRM114-Status: GOOD ( 18.36 ) 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 Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain Subject: [OpenWrt-Devel] [PATCH v2 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>; +