From patchwork Wed May 1 17:42:18 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: 1093765 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="Q1sYUGTH"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="ExLnAPRD"; 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 44vQj122n4z9sNm for ; Thu, 2 May 2019 03:43:01 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=r/MQUmtUdbgTSjJ9Dub2UeTDQceqTleTk9fMcQJp5Es=; b=Q1sYUGTHreDEICS4iWrgQNdsli hvOoe9/2zqUzRgCrR2eMw6xaUFexcejDp42KykeIYEuNNMPmsEHRNwZYVl5MeypD9nbHKEhJjgHHE hxiNZMiJTIn8qldDdAdm965J4W4rV7wssWgmpAZFodaelwrka9A2PFwsdsaLeMrGuZVx34KZGl9am 6K3rcW3aUmw+LRykS6VsCYoftwBZCzWq0xBJWfhamEXrmYoV14RrWc+g9ncOQQ+XbYYVLSzsAdi9E IXUqsizI8m9+NwOBhCrbCkwnMeMxVF2k0OX6ldCmMq57L9+ljYwn7qfTwGCEtKSIXu3xUQhCBJpBT z8FDTNWQ==; 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 1hLtFo-0007Yf-NV; Wed, 01 May 2019 17:42:48 +0000 Received: from mx-out.tlen.pl ([193.222.135.175]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLtFd-0007Nq-CK for openwrt-devel@lists.openwrt.org; Wed, 01 May 2019 17:42:39 +0000 Received: (wp-smtpd smtp.tlen.pl 406 invoked from network); 1 May 2019 19:42:33 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1556732553; bh=7t9DlMXJdenDlLIeBrygyJJMSJUUIEcv1tUCi2YAfiU=; h=From:To:Subject; b=ExLnAPRD8N3rxt0NRltHdZi0OSI6i9LMyqgNrM3AhQ8vYpQ1N5yx2jEjjpRP2tMc2 ksgXvSTKrHCCvMwYF0/inEvdkoo4rmoM/lUF8esZsMQdO7mV0v0ECqYsp8rYIoO4cl AYIbSw1Sff2wWqf9du99WTA2wE6jmc4iq1drLtkg= 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 ; 1 May 2019 19:42:33 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Wed, 1 May 2019 19:42:18 +0200 Message-Id: <20190501174224.19089-3-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501174224.19089-1-tomek_n@o2.pl> References: <20190501174224.19089-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 12ebd974876dd3c54cd0d48a927e6e72 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [MVN0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190501_104237_754207_34610C2A X-CRM114-Status: UNSURE ( 6.91 ) 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 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.175 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 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 18421d1dd0..c0bb02d7c0 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 Wed May 1 17:42:19 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: 1093767 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="g/fF6py+"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="ahhnnU1i"; 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 44vQjS04x0z9sNQ for ; Thu, 2 May 2019 03:43:24 +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=abpaH+HHvN64BnQffFgpms0o6N/xhi6CAkLeyaxj5+c=; b=g/fF6py+OKNTI5afk/Rs1gt1q/ TQFln9KIuJO3+w2EAkhg8kgBiCdMI3Qs9Z9NnK6TdBJXAh8ooV2jh3btMaLgb1EolV2qsDaoaSew5 ftIPu+sQd4vFi+snIyXKyzHoSG//EQQvbwBO7wMnGldWN1K/iHVynE18+WxIDZeTxvGqcq820oLKC yrCssHcRStZsMJQ5RVUtQBkVw1aaE1Y0MW9yD3nNFTq6/b+1H9Y4/i7iwSEFMxPUFi9QaDklGeZk8 8a55vJPrJtdgWry3Ke55h1yCIEAiFvjZrNMF3it0GatQ5HYOEg13wQLIdlEF6m0wwtUiOjLyh7b3Y RNLERWLg==; 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 1hLtGB-00087G-7y; Wed, 01 May 2019 17:43:11 +0000 Received: from mx-out.tlen.pl ([193.222.135.175]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLtFd-0007O5-VM for openwrt-devel@lists.openwrt.org; Wed, 01 May 2019 17:42:41 +0000 Received: (wp-smtpd smtp.tlen.pl 1382 invoked from network); 1 May 2019 19:42:34 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1556732554; bh=OZuR0VHOMJxtTRuIlDRtFiBXWEaqI+A3Bcq8ld2ntuw=; h=From:To:Subject; b=ahhnnU1ibcvrmhp8MmX7rbe9T8Mgk0hWb0NigE/LJfqqmPw4coT8rhQvhXjEaFOC/ V5N4F9ZsSdRiPliJPDMSWC7HJhSqSuR9VF2eXwCrsMZcC7TvAkxrWdgSg2LFfif7yV eahYHMdb9rJCSvfQo1FGhZud8WYqpAKxxxy9IPxg= 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 ; 1 May 2019 19:42:34 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Wed, 1 May 2019 19:42:19 +0200 Message-Id: <20190501174224.19089-4-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501174224.19089-1-tomek_n@o2.pl> References: <20190501174224.19089-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: be7713e4e4a939d53804b7a380a76e36 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [wYMk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190501_104238_167600_7671109B X-CRM114-Status: GOOD ( 11.66 ) 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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.175 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 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 c0bb02d7c0..95885d8ab6 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 Wed May 1 17:42:20 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: 1093766 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="GQiODSZx"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="kmia/iLn"; 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 44vQjB1C4Bz9sNQ for ; Thu, 2 May 2019 03:43:10 +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=YmI4qyk11FHLWa10REdWl/+yAtNuetnsyMjh7A5xU/A=; b=GQiODSZxdSvPt30LKrrja5MTz2 EPggsXa5aWW0KJZXV7C4iBa6i8zZcjt/eB4HuOsV0yQUYgK1zcLYA7WyzVt+Upl4YXOHUf48uFwEj OG3EMxT4OAu5GJhld1+uSGXKBq0TLVyh/0b6picXylPPG+3GTYhDMBTILK+LXJ/WjePU03YgPGuKl vvWeqy/eHDoz0mxsNN3Ao1eiyCHRIiOWXY8Yx1hh0Psb8f3CSVcm+yJpHbMPcMmU0W9k8zCqBc1RH h/w5o6+m42dTQik4AGvHwLBVaUcb8NMVVRFH9UIXdiylWxclTKKBZv7RCzCibLYV7egdUY4R4H8Ls kzYJ7Ngg==; 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 1hLtFz-0007pr-QC; Wed, 01 May 2019 17:42:59 +0000 Received: from mx-out.tlen.pl ([193.222.135.175]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLtFe-0007O6-Nn for openwrt-devel@lists.openwrt.org; Wed, 01 May 2019 17:42:41 +0000 Received: (wp-smtpd smtp.tlen.pl 2181 invoked from network); 1 May 2019 19:42:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1556732555; bh=uMFqfdf+PVuzSg1SIaRjOB0wKJTAouqW9VxWktk/V3o=; h=From:To:Subject; b=kmia/iLnbo1XsmI5WrAQ1rqqdYvAfaLG7umrTJemyEMdZ8zzB5xeGU9vwc2pIX7LQ 5RoOVG3Wpl5/TmGs4CL5MZ2lODhcBaRVhPcYnZgfeELiwuIP40NDeezse5qKgTyQLj HODLfhUqdK+bea/aU2z7rNfbSjZQgDl8soEqpdhQ= 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 ; 1 May 2019 19:42:35 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Wed, 1 May 2019 19:42:20 +0200 Message-Id: <20190501174224.19089-5-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501174224.19089-1-tomek_n@o2.pl> References: <20190501174224.19089-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 1bf07209e598d81e5fe25780c71195d0 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [IVP0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190501_104238_932796_26921379 X-CRM114-Status: UNSURE ( 6.47 ) 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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.175 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 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 95885d8ab6..4a1a85d681 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 Wed May 1 17:42:21 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: 1093772 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="UPUFPJiz"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="oLSAgUHt"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="HO8Irq5K"; 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 44vQkD55Bvz9sNm for ; Thu, 2 May 2019 03:44:04 +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=vpV8VoCOA+OLOjOSbAsL8cBUdhrWuHBHQk3Z54bFFtE=; b=UPUFPJiz7Rf50U4DV8jlfv4ttG K9psqFPQQlaWx1tvTTXqxweenzv4IUXoYcR6bwEyIZVA9uQWJxgX1dcLBieIHN/LB4saJzL+za5i3 2Crg4U0L4XAEOdJD8X5cf6mkqY4BccsaTvhXKQb2NqzML44/CxUxei8Ph7c/C4wz5mLBhIrmonHTB gCVyoA1lL5q86XTUIkRGqp14gDbW3XSHPEIj7FE87KkIfNme65TkEHXjjLnk5GJGQ2OHdrpmTiL27 rPSwajAtXppGkA8qjSmFkoaY3C8j6tW2rgCJJnnFY6I6ehHAcZq4pcRS4IsupetWyzVl1LeyNMnNA dnc99apA==; 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 1hLtGr-0000i9-86; Wed, 01 May 2019 17:43:53 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLtGC-00088q-U7 for openwrt-devel@bombadil.infradead.org; Wed, 01 May 2019 17:43:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=G48nnIH+5TUYc3AgxNUkbPqqiq9fr6cdwo0GgU6d7M0=; b=oLSAgUHtR7Nn9EhCVehdg+Eq1I 9Gkir70dtkogRAM7vt2aEaSfzAuKIspkhg6A5+CARs4T+E/I7rLQYsHE7v4doafYMQRFOePqNbFVE WsaARwtKFiXJL5c/kGR1lqzsxY9uwpdeCDqWuOAiaxmpJmLr9tUsFj92xUQNclTPhPgFnas4z0X9e Xe5H2YQP92SDWbgVzRlOXgjRrwqhctfB/5A5E+jX7Ifuw6HewWGxomMcrtP6SAqNKynljYHXfCxzp W/93TECggxtL06iaAfhuAupPZr9aQQVJuzaHMo/j3BJJsD0vu1+ymw6p5fT8GisMscPijkSWsVRYr O++CESlA==; Received: from mx-out.tlen.pl ([193.222.135.175]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLtG9-0006P4-76 for openwrt-devel@lists.openwrt.org; Wed, 01 May 2019 17:43:11 +0000 Received: (wp-smtpd smtp.tlen.pl 2802 invoked from network); 1 May 2019 19:42:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1556732556; bh=G48nnIH+5TUYc3AgxNUkbPqqiq9fr6cdwo0GgU6d7M0=; h=From:To:Subject; b=HO8Irq5KmQD/iF7oqJiHrvV3kKnjYVl0EjLQ2iCz3YcQKcj2PRSGfHIf1yR1hrYyf E3RkBI69lmPcFIcpkoBLgRJkRFiwgi/QOWon+Ovqp8HW+wZBkXJr9lIdHyfu0VIPM5 uONLq7ZNGRhep9Ox1gjf/aRJklE3l0u4Ke1GnjSA= 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 ; 1 May 2019 19:42:35 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Wed, 1 May 2019 19:42:21 +0200 Message-Id: <20190501174224.19089-6-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501174224.19089-1-tomek_n@o2.pl> References: <20190501174224.19089-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 6e761a0c9e808a4eeb29e0064eb58b23 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [4ZMU] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190501_184309_375866_224BDF26 X-CRM114-Status: UNSURE ( 8.01 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on casper.infradead.org summary: Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.175 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 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 and 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 4a1a85d681..240cc88642 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 Wed May 1 17:42: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: 1093769 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="ERSJ/Mgh"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="XvzFMEwx"; 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 44vQjb1kbQz9sNQ for ; Thu, 2 May 2019 03:43:31 +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=d+0rnv5m2DTAjZIfQ68RsBOOb4IXt9TO48b9zm4U9D4=; b=ERSJ/Mghfq4t+2m03B7mm+IETh DIGR2jQ9ZeKluaVTt7QM1RO4Vu/QUZEj9lCIa8QjZRXznyRJEiD1fX9DkEIPtDppJTR6R6T2Rtzoh wiefiePJ550tNR2mVs8cmtU/Qrb0CvOo9KA8L0hv5yrXMao+RAg658aJN+EpjZzc67IZKYWY5G2Gt +wI8KkD0xGZaA8DqciT1vfjM14PH6XJ+Hd5KHRyOshcLLGhViPNmRSXC5p4iWxKf/4CUuDCL91GGr hppov7Qp0fuLFUus004oDgjM6jyNLBcixs7tI4RSPBb39C0Lb6x2IMutFXUOPxMGNr7FwtfeEDJwB 61qLYwqQ==; 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 1hLtGK-0008LP-If; Wed, 01 May 2019 17:43:20 +0000 Received: from mx-out.tlen.pl ([193.222.135.175]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLtFe-0007O8-O9 for openwrt-devel@lists.openwrt.org; Wed, 01 May 2019 17:42:41 +0000 Received: (wp-smtpd smtp.tlen.pl 3559 invoked from network); 1 May 2019 19:42:36 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1556732556; bh=BRvVeBLYP7dXDP6VS+wPXltOzSWMLHVVlrWGMcRxNvg=; h=From:To:Subject; b=XvzFMEwxcbmws9UsZO14nXg1Fn8yfbW70YyQKKijwZV1CklOX7Irolpt+EI8QvrXb XF8Cg2QqKQ+nlsc2ZXJLgn1wSRA0GBVsxLujjywAujsFj/ikGqAA8Lc+K5JQCMWQ8N PWXkIFCKg+wDddx8xUegJaodDoFIkKy52FmwRhbM= 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 ; 1 May 2019 19:42:36 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Wed, 1 May 2019 19:42:22 +0200 Message-Id: <20190501174224.19089-7-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501174224.19089-1-tomek_n@o2.pl> References: <20190501174224.19089-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 6eb240e51cdcc90b0b4d73aad6c4e463 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [EaNk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190501_104238_943866_AC175C0D X-CRM114-Status: UNSURE ( 8.09 ) 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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.175 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 6/8] mvebu: add vendor to device names 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 Replace SoC names with vendors in device names, in few cases, and add vendor to developemnt boards for easier identyfying potential firmware to flash. 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 | 4 +-- target/linux/mvebu/image/cortex-a72.mk | 12 +++---- target/linux/mvebu/image/cortex-a9.mk | 44 +++++++++++++++----------- 5 files changed, 34 insertions(+), 29 deletions(-) diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index 61547acb27..06c574594b 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 solidrun-clearfog-pro 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 240cc88642..fe74a12c65 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..4dd1e44665 100644 --- a/target/linux/mvebu/image/cortex-a53.mk +++ b/target/linux/mvebu/image/cortex-a53.mk @@ -8,12 +8,12 @@ define Device/globalscale-espressobin endef 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..3043f087cc 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-armada-8040-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-armada-8040-db -define Device/armada-7040-db +define Device/marvell-armada-7040-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-armada-7040-db endif diff --git a/target/linux/mvebu/image/cortex-a9.mk b/target/linux/mvebu/image/cortex-a9.mk index 252300b942..e5459dad1a 100644 --- a/target/linux/mvebu/image/cortex-a9.mk +++ b/target/linux/mvebu/image/cortex-a9.mk @@ -61,57 +61,63 @@ define Device/linksys-wrt1900ac endef 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-armada-385-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-armada-385-db-ap -define Device/armada-370-db +define Device/marvell-armada-370-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-armada-370-db -define Device/armada-370-rd +define Device/marvell-armada-370-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-armada-370-rd -define Device/armada-xp-db +define Device/marvell-armada-xp-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-armada-xp-db -define Device/armada-xp-gp +define Device/marvell-armada-xp-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-armada-xp-gp -define Device/armada-388-rd +define Device/marvell-armada-388-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-armada-388-rd -define Device/armada-388-clearfog-pro +define Device/solidrun-clearfog-pro 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 -define Device/armada-388-clearfog-base +define Device/solidrun-clearfog-base KERNEL_INSTALL := 1 KERNEL := kernel-bin DEVICE_TITLE := SolidRun ClearFog Base @@ -136,7 +142,7 @@ 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 define Device/globalscale-mirabox $(Device/NAND-512K) From patchwork Wed May 1 17:42: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: 1093770 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="AuxvIjKe"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="gRTA7m65"; 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 44vQjr2VxGz9sNQ for ; Thu, 2 May 2019 03:43:44 +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=433PGS53T8qmpPGFfVqQev02RjjGPOWybbOkfmmTwt8=; b=AuxvIjKe1PMrGnGNs7SMuXuxEf 0Y3OsxOvpGi0pbCI3pY8VqcrRBYdH6SDoug/3Ecg+EuMvaK6g4lI32PkzKHTARH11G17jUJ4QKJhZ jPQfCRBxNMAnQJAjbGu3tVvzVjXM8LG6YqAZvUR8ugd6LeT6BYdw1e0sgKv4fd69nXvlBfuqQtYwH hlLqZG7WXbRa0FHJRugR9kCX9Zy+WbmDZNlNiVVof8k7XBjPFLMox8I5/XwqN9sxlE5jTP93yjSDD dahuQi5sei9J6PiAqGX7f2WsWsaG3YBMMuH34l7thv/rMNPcZNSOo89cHFMHXdFY+/kbZVXkvu5cx LKin7p6A==; 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 1hLtGV-0000Az-Fy; Wed, 01 May 2019 17:43:31 +0000 Received: from mx-out.tlen.pl ([193.222.135.175]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLtFg-0007Ol-66 for openwrt-devel@lists.openwrt.org; Wed, 01 May 2019 17:42:43 +0000 Received: (wp-smtpd smtp.tlen.pl 4215 invoked from network); 1 May 2019 19:42:37 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1556732557; bh=BJlb+9UTyjHNjTxK5ssCxDzbekx0OxE5Fc+XJBG4zUg=; h=From:To:Subject; b=gRTA7m651eiLRB8kVFqLHWZQ+fnZ4ijOprxqdEepa56qr2z/tL+1qSgOBfiSDRtb6 zOXg5S/CLpAf2cCGnlVD4Fpw1FJcsPwFq6I1mggY82ZkiZHKd+laT9UvkV/7q0fhoQ 9p80tuiqbdA9S8V2FeafJac7fRIfk3TCjCYb4bhM= 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 ; 1 May 2019 19:42:37 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Wed, 1 May 2019 19:42:23 +0200 Message-Id: <20190501174224.19089-8-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501174224.19089-1-tomek_n@o2.pl> References: <20190501174224.19089-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 3d203a48612578c0f4cba58d18622fb4 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [MVO0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190501_104240_552014_79EB858B X-CRM114-Status: GOOD ( 10.19 ) 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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.175 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 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/cortex-a9.mk | 20 +++- 14 files changed, 85 insertions(+), 174 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/cortex-a9.mk b/target/linux/mvebu/image/cortex-a9.mk index e5459dad1a..c1252b58d3 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 += 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 += 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 += 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 += 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 += 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 += 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 plathome,openblocks-ax3-4 BLOCKSIZE := 128k PAGESIZE := 1 IMAGES += factory.img @@ -78,6 +84,7 @@ define Device/marvell-armada-385-db-ap IMAGES += factory.img KERNEL_SIZE := 8192k DEVICE_TITLE := Marvell Armada 385 DB AP (DB-88F6820-AP) + SUPPORTED_DEVICES += marvell,a385-db-ap endef TARGET_DEVICES += marvell-armada-385-db-ap @@ -85,6 +92,7 @@ define Device/marvell-armada-370-db $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada 370 DB (DB-88F6710-BP-DDR3) DEVICE_DTS := armada-370-db + SUPPORTED_DEVICES += marvell,a370-db endef TARGET_DEVICES += marvell-armada-370-db @@ -92,6 +100,7 @@ define Device/marvell-armada-370-rd $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada 370 RD (RD-88F6710-A1) DEVICE_DTS := armada-370-rd + SUPPORTED_DEVICES += marvell,a370-rd endef TARGET_DEVICES += marvell-armada-370-rd @@ -99,6 +108,7 @@ define Device/marvell-armada-xp-db $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada XP DB (DB-78460-BP) DEVICE_DTS := armada-xp-db + SUPPORTED_DEVICES += marvell,axp-db endef TARGET_DEVICES += marvell-armada-xp-db @@ -106,6 +116,7 @@ define Device/marvell-armada-xp-gp $(Device/NAND-512K) DEVICE_TITLE := Marvell Armada XP GP (DB-MV784MP-GP) DEVICE_DTS := armada-xp-gp + SUPPORTED_DEVICES += marvell,axp-gp endef TARGET_DEVICES += marvell-armada-xp-gp @@ -114,6 +125,7 @@ define Device/marvell-armada-388-rd DEVICE_DTS := armada-388-rd IMAGES := firmware.bin IMAGE/firmware.bin := append-kernel | pad-to 256k | append-rootfs | pad-rootfs + SUPPORTED_DEVICES += marvell,a385-rd endef TARGET_DEVICES += marvell-armada-388-rd @@ -125,7 +137,7 @@ define Device/solidrun-clearfog-pro 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 solidrun,clearfog-pro-a1 UBOOT := clearfog-u-boot-spl.kwb BOOT_SCRIPT := clearfog endef @@ -139,6 +151,7 @@ define Device/solidrun-clearfog-base 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 += solidrun,clearfog-base-a1 UBOOT := clearfog-u-boot-spl.kwb BOOT_SCRIPT := clearfog endef @@ -147,7 +160,7 @@ TARGET_DEVICES += solidrun-clearfog-base define Device/globalscale-mirabox $(Device/NAND-512K) DEVICE_DTS := armada-370-mirabox - SUPPORTED_DEVICES := mirabox + SUPPORTED_DEVICES := mirabox globalscale,mirabox DEVICE_TITLE := Globalscale Mirabox endef TARGET_DEVICES += globalscale-mirabox @@ -166,6 +179,7 @@ define Device/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 += cznic,turris-omnia endef TARGET_DEVICES += turris-omnia From patchwork Wed May 1 17:42: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: 1093771 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="hW8jxTir"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.b="kKQBM5bv"; 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 44vQk85j7rz9sNQ for ; Thu, 2 May 2019 03:44:00 +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=x7/ez+bWzXgnCCWZmEqgixU+uSsFvdJBMmRX0r754X0=; b=hW8jxTirWWdJA6zIdXV3fSKU3X oQRlzekhSjzpb54DzxBAJl/6mW9xsfncH/FLzHKVzznSwfvka7FAwyJtYL6E3L3jWY9gObYi7hljb cJ+c45yhmaDCdOTrCn5OjOazYobCYYhFoMiH0yso33LNNq21LBa14flUQchdnuMeznr+2YgPxXkH3 HiVu8nq/KA5tWnaxNTv5COz5xRgj8Md41hz98xsfjO+nqPXPSWcqAWiKxUM7bJsNBpC1unucYLvEy 7SObfYm+eMScLpjg5JRsKM9OzPWykiJriI4WJvF8nZwQAvInShwn+CNqyfoPXZ9hW745Bk+2Glw7a YY7bUmvw==; 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 1hLtGf-0000R4-Uw; Wed, 01 May 2019 17:43:41 +0000 Received: from mx-out.tlen.pl ([193.222.135.175]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLtFh-0007PS-D2 for openwrt-devel@lists.openwrt.org; Wed, 01 May 2019 17:42:47 +0000 Received: (wp-smtpd smtp.tlen.pl 5440 invoked from network); 1 May 2019 19:42:38 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1556732558; bh=tM7J/Nx95/3RrQCExydvjuxdykYjeHzL31HjoAV9N7w=; h=From:To:Subject; b=kKQBM5bvJbWfiBJJ3e8Ygiy1IUBsHXg4qREB9apVbzJZDT5pIHbfCbjefsDAqmIkW T4W/Nj43D7SACaQlAJu5oFSJidh2Lpa2PVWs8onkG0/7aPFnO1T+pNnoZHACJIufM1 eqzfwsJZYB61tWhKfH4kRTDfyPmWX+o+MQ3iUA3g= 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 ; 1 May 2019 19:42:38 +0200 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Wed, 1 May 2019 19:42:24 +0200 Message-Id: <20190501174224.19089-9-tomek_n@o2.pl> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190501174224.19089-1-tomek_n@o2.pl> References: <20190501174224.19089-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 421f276e30858b53d3276cec42d391a6 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [UfN0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190501_104241_759122_EF74BDD1 X-CRM114-Status: GOOD ( 18.50 ) 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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [193.222.135.175 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [OpenWrt-Devel] [PATCH 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 to upgrade bootloader based on U-Boot 2015.01, to 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 | 24 +++++++++ ...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, 242 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 4dd1e44665..94ee5d6583 100644 --- a/target/linux/mvebu/image/cortex-a53.mk +++ b/target/linux/mvebu/image/cortex-a53.mk @@ -8,6 +8,30 @@ 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 + SUPPORTED_DEVICES := globalscale,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 + SUPPORTED_DEVICES := globalscale,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 + SUPPORTED_DEVICES := globalscale,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>; +