From patchwork Tue Feb 25 19:07:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1244484 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=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.a=rsa-sha256 header.s=bombadil.20170209 header.b=GNQH+7ff; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.a=rsa-sha256 header.s=1024a header.b=mp7uA0ex; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RpQ66hrHz9sQx for ; Wed, 26 Feb 2020 06:09:18 +1100 (AEDT) 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: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:In-Reply-To:References: List-Owner; bh=t8ZbN+7HIYCq2KtNrujVzkwP9pRuGdJwAToPd9yQ9eo=; b=GNQH+7ffKIiBpo Fjbvp1VArgtJ+U5gmQDDtUstgLQ6wFn+h2v68fVx8XYqZBpQOnzPn9u0dxUfvtrGO4/BFe5vVPhZr D5fkrDaMf54mzB5dFoGDfHf9l+e+SljUn0j3Cyns1h49be+QeN2ssrbQ5zswgyGKechDtMbea5e7x TlaHV9pYQxjXLC26b+8bzoCZ9fc04I8u1sviD63R/ix/qH36RGoH21Y/red7Gp5H5zRb5iZPyoQBz oYH5tO3O5zRrEOYunVcfZki9cEwV8y88VYwE4bAb1Ww331+RNFsBcwEdSkTrRoiizXH9pdWnz/CFi GeF5LoYg466h5P/u4Y1w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fZx-0007V0-Q5; Tue, 25 Feb 2020 19:09:13 +0000 Received: from mx-out.tlen.pl ([193.222.135.145]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fYv-0006By-5H for openwrt-devel@lists.openwrt.org; Tue, 25 Feb 2020 19:08:13 +0000 Received: (wp-smtpd smtp.tlen.pl 9724 invoked from network); 25 Feb 2020 20:07:59 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1582657680; bh=yDNLP2RVXo2xjGQqABPjaCT/0geTpxmXU9gFKYJBQ3M=; h=From:To:Subject; b=mp7uA0ex+WTE/3QfFTdd6dqxzG0EzIyfewIV11DjNLDjnIGXAdOsflYGjSfsXpKJ9 kA9O0E2KL7okn2UuYPWlR7iirv2nNoUm57TAty6AZXHnoFY7Id69JZfVKbMOzSci1R aEzmuBnNiiNl19rXZ18xd2e0ZrDCeosjaXvzft7E= Received: from unknown (HELO localhost.localdomain) (tomek_n@o2.pl@[5.2.67.190]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 25 Feb 2020 20:07:59 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 25 Feb 2020 20:07:36 +0100 Message-Id: <20200225190741.113235-1-tomek_n@o2.pl> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-WP-MailID: 69f937ac9c4bb1ead10b948ccef93e55 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [0SOU] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_110809_362516_D9085FB1 X-CRM114-Status: UNSURE ( 9.76 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tomek_n[at]o2.pl] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 1/6] layerscape: resurrect support for FRDM-LS1012A X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 Re-add support for NXP FRDM-LS1012A, which mimics the flash layout of the rest boards supported by LSDK. 0x000000000000-0x000000100000 : "bl2" 0x000000100000-0x000000500000 : "fip" 0x000000500000-0x000000600000 : "u-boot-env" 0x000000600000-0x000000a00000 : "reserved-1" 0x000000a00000-0x000000d00000 : "pfe" 0x000000d00000-0x000000f00000 : "reserved-2" 0x000000f00000-0x000001000000 : "dtb" 0x000001000000-0x000002000000 : "kernel" 0x000002000000-0x000004000000 : "ubifs" Specification SoC: LS1012A single core 800MHz RAM: 512 MB DDR3 Flash: 64 MB QSPI NOR Ethernet: 2x 10/100/1000 Mbps Connectors: µUSB 3.0 OTG µUSB 2.0 (debugging & power input) 2x 3.5mm jack for microphone & headphone (SGTL5000) Arduino Shield expansion with I2C, SPI, UART, and GPIO JTAG LEDS: 3x (non-configurable) Buttons: 1x (reset, non-configurable) Be advised that erasing or writing 64MB flash takes some time to finish. Do not reset the board until all operations end with success, otherwise You'll need external tools to re-program the flash chip. Installation Follow the QSPI programing procedure for LS1012AFRWY board in target/linux/layerscape/README, point 3.3. Don't forget about updating U-Boot environment with MAC addresses of ethernet interfaces, variable 'ethaddr' for eth0 and 'eth1addr' for eth1. As the LSDK images do not support sysupgrade, nor do changes in this commit, it's planed in upcoming submissions. Signed-off-by: Tomasz Maciej Nowak --- package/boot/tfa-layerscape/Makefile | 9 ++++++++ package/boot/uboot-layerscape/Makefile | 7 ++++++ .../files/ls1012afrdm-uEnv.txt | 8 +++++++ package/firmware/layerscape/ls-rcw/Makefile | 6 +++++ target/linux/layerscape/image/armv8_64b.mk | 23 +++++++++++++++++++ 5 files changed, 53 insertions(+) create mode 100644 package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index a34c52bc3b..d2da84ec15 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -69,6 +69,14 @@ define Host/Install $(INSTALL_BIN) $(HOST_BUILD_DIR)/plat/nxp/tools/byte_swap $(STAGING_DIR_HOST)/bin/tfa-byte-swap endef +define Package/tfa-layerscape/ls1012afrdm + TITLE:=NXP LS1012AFRDM Trusted Firmware + PLAT:=ls1012afrdm + BOOT_MODE:=qspi + BIN_BL2:=build/ls1012afrdm/release/bl2_qspi.pbl + BIN_FIP:=build/ls1012afrdm/release/fip.bin +endef + define Package/tfa-layerscape/ls1012ardb TITLE:=NXP LS1012ARDB Trusted Firmware PLAT:=ls1012ardb @@ -142,6 +150,7 @@ define Package/tfa-layerscape/ls2088ardb endef TFAS := \ + ls1012afrdm \ ls1012ardb \ ls1012afrwy \ ls1043ardb \ diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index ddf71bd986..63c16a7db0 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -27,6 +27,12 @@ define U-Boot/Default ENV_SIZE:=0x2000 endef +define U-Boot/ls1012afrdm + NAME:=NXP LS1012AFRDM + UBOOT_CONFIG:=ls1012afrdm_tfa + ENV_SIZE:=0x40000 +endef + define U-Boot/ls1012ardb NAME:=NXP LS1012ARDB UBOOT_CONFIG:=ls1012ardb_tfa @@ -102,6 +108,7 @@ endef UBOOT_TARGETS := \ + ls1012afrdm \ ls1012ardb \ ls1012afrwy \ ls1043ardb \ diff --git a/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt b/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt new file mode 100644 index 0000000000..ccc98dd299 --- /dev/null +++ b/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt @@ -0,0 +1,8 @@ +fdtaddr=0x8f000000 +loadaddr=0x81000000 +fdt_high=0xffffffffffffffff +initrd_high=0xffffffffffffffff +qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr +bootargs=ubi.mtd=8 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(ubifs) +bootcmd=echo starting OpenWrt ...;pfe stop;run qspi_boot +bootdelay=3 diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index 5bcbff5bc4..ddef58fa0b 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -28,6 +28,11 @@ define Package/layerscape-rcw/Config endef endef +define Package/layerscape-rcw/ls1012afrdm + TITLE:=NXP LS1012AFRDM RCW binary + CONFIG:=ls1012afrdm/N_SSNP_3305/rcw_800.bin +endef + define Package/layerscape-rcw/ls1012ardb TITLE:=NXP LS1012ARDB RCW binary CONFIG:=ls1012ardb/R_SPNH_3508/rcw_1000_default.bin @@ -86,6 +91,7 @@ define Package/layerscape-rcw/Install endef RCWS := \ + ls1012afrdm \ ls1012ardb \ ls1012afrwy \ ls1043ardb \ diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 61ea849119..0322183b96 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -15,6 +15,29 @@ define Device/Default KERNEL_ENTRY_POINT := 0x80080000 endef +define Device/ls1012afrdm + DEVICE_VENDOR := NXP + DEVICE_MODEL := FRDM-LS1012A + DEVICE_PACKAGES += \ + layerscape-ppfe \ + tfa-ls1012afrdm \ + kmod-ppfe + DEVICE_DTS := freescale/fsl-ls1012a-frdm + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 256KiB + PAGESIZE := 1 + IMAGE/firmware.bin := \ + ls-clean | \ + ls-append $(1)-bl2.pbl | pad-to 1M | \ + ls-append $(1)-fip.bin | pad-to 5M | \ + ls-append $(1)-uboot-env.bin | pad-to 10M | \ + ls-append pfe.itb | pad-to 15M | \ + ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ + append-kernel | pad-to 32M | \ + append-ubi | check-size 67108865 +endef +TARGET_DEVICES += ls1012afrdm + define Device/ls1012ardb DEVICE_VENDOR := NXP DEVICE_MODEL := LS1012A-RDB From patchwork Tue Feb 25 19:07:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1244479 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=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.a=rsa-sha256 header.s=bombadil.20170209 header.b=MB467dFd; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.a=rsa-sha256 header.s=1024a header.b=BYPCfWDE; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RpNw4QL0z9sR4 for ; Wed, 26 Feb 2020 06:08:15 +1100 (AEDT) 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=dd+EsPUvmC2GhkBlPdcOD19+HFdwJtvBW5kkqdTYrDw=; b=MB467dFd3GcmzlCXo0ie82aqfS CMCeiOqAdkBC78GDAmBoIncvyaXSqIuwkYWpVkd+LEuGFgnigVhAz8uFHw/ZgXtstonUA/KoZ3Owy +jI0bEEs6gw4VgbhqYDUhLSGkE34sQn0OM4BidUq7ZiAeb95DSlw5ktQCWMObjpHUOt7DFtkxcL7Y gv9wnVGAcCar+2jO5/9Znk/Ilsp7eHg9U7znFY43EskIzBefEw7FzuIQgeMGfDZ1L06SwS1BBeqlA k0UzonqYxIDpI1JU8nbuHT4st9ySOzGxfvlpJLXey6uKvkDd3v6nQEVhS0e4aiDn+WLLZf42xNeA7 wpfptPFQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fYy-0006Ey-Lz; Tue, 25 Feb 2020 19:08:12 +0000 Received: from mx-out.tlen.pl ([193.222.135.145]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fYu-0006C1-NT for openwrt-devel@lists.openwrt.org; Tue, 25 Feb 2020 19:08:11 +0000 Received: (wp-smtpd smtp.tlen.pl 12313 invoked from network); 25 Feb 2020 20:08:00 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1582657681; bh=pA55squpiSFWG6AEPPcO5W1VllkfyGH2gj58/Dm44uE=; h=From:To:Subject; b=BYPCfWDEK0lhOTXqyR9u86FU2tcV7kNDLitOsj+bE491I1QWTHtQTqLejgsS0owW6 G26FPzQun+YRv6TaXSmloRUXWLRWkm3blQSA/HcfaeZY0dcU5QUATZMIlPkTU/a/6V 88VGCLCDDGG/lgZ99UmrBi0uN3fHQ8obz4ed0T+U= Received: from unknown (HELO localhost.localdomain) (tomek_n@o2.pl@[5.2.67.190]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 25 Feb 2020 20:08:00 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 25 Feb 2020 20:07:37 +0100 Message-Id: <20200225190741.113235-2-tomek_n@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200225190741.113235-1-tomek_n@o2.pl> References: <20200225190741.113235-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 3082fbaf0c9ea7faf9c0a8f62d057b7f X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [EcN0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_110809_099043_5EC3E652 X-CRM114-Status: UNSURE ( 6.26 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tomek_n[at]o2.pl] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 2/6] layerscape: ls1012afrdm: add uncompressed initramfs X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 Uncompressing of initramfs image fails on board with U-Boot from "QorIQ SDK (FSL Reference Distro) 2.0". Signed-off-by: Tomasz Maciej Nowak --- target/linux/layerscape/image/armv8_64b.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 0322183b96..c2e091fb2a 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -35,6 +35,7 @@ define Device/ls1012afrdm ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to 32M | \ append-ubi | check-size 67108865 + KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb endef TARGET_DEVICES += ls1012afrdm From patchwork Tue Feb 25 19:07:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1244482 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=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.a=rsa-sha256 header.s=bombadil.20170209 header.b=hLpw+Mlh; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.a=rsa-sha256 header.s=1024a header.b=PlPJJv2L; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RpPj4Cyzz9sQx for ; Wed, 26 Feb 2020 06:08:57 +1100 (AEDT) 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=KOudRBoRGg2ntJyYSK0AFsDeWSx7HBrh0tmYR7KQBhc=; b=hLpw+Mlhzf29cmxdJ324k9SjzE 3lDcuLYKV0Rllo5tF4AlhELAk6iRIL5UB03yupCr9aObT+R248GkOzY4nnDAePqITkboZPJaHFVCA 7Fbf/n6izzNSGVDoy5VsySanPMZxFh5tQ2DsVZmk0AfVKVUIlpvp61XbLftZIhuWcDuu82MUyq7wU oT0oSiJ/141e6AAaASYVKmY/OjyuYG/RoE4oyJ4uCQqvp1BlSpLimfHNDfxSfEtQQbpl2YUsOF+wp +O1IkN/+k35tyC9ON9dKSJIyDM1jf7Rsw5hv9f4k+PzeH2jfzMVYgJu/l3dfoGVTzwSZgfaIi9SM2 0vesAPzw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fZd-00070G-Vb; Tue, 25 Feb 2020 19:08:53 +0000 Received: from mx-out.tlen.pl ([193.222.135.145]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fYu-0006C2-Mh for openwrt-devel@lists.openwrt.org; Tue, 25 Feb 2020 19:08:13 +0000 Received: (wp-smtpd smtp.tlen.pl 14277 invoked from network); 25 Feb 2020 20:08:01 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1582657681; bh=GUH2E6jlKbzV90Pe4dFVVk48c25rx1M/tKQad0w0aPE=; h=From:To:Subject; b=PlPJJv2LIIkKpl3XKIbfHFskWk7/+ETD5U53X8WJ/df0oy9WAI+Q71+A55fG6d8Tg Fcebmb5SvdAQOPPfXORrlcJNyK0KFtMCDyxELGrJRBXHjU/34JaXXt68gculX0sB4U nWxXVz0EOHDRktBa2tiON0kNT89QgiRGIUgxxBVI= Received: from unknown (HELO localhost.localdomain) (tomek_n@o2.pl@[5.2.67.190]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 25 Feb 2020 20:08:01 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 25 Feb 2020 20:07:38 +0100 Message-Id: <20200225190741.113235-3-tomek_n@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200225190741.113235-1-tomek_n@o2.pl> References: <20200225190741.113235-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: b5ce24a58af728df79a383ab3055bfd9 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [USN0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_110809_088924_CACCCE48 X-CRM114-Status: UNSURE ( 7.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tomek_n[at]o2.pl] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 3/6] layerscape: ls1012afrdm: convert image to squashfs X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 replaces UBIFS root partition with squashfs+overlay. It's preparation for introducing dynamic partitioning. Signed-off-by: Tomasz Maciej Nowak --- package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt | 2 +- target/linux/layerscape/image/armv8_64b.mk | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt b/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt index ccc98dd299..0f213d85e8 100644 --- a/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt +++ b/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt @@ -3,6 +3,6 @@ loadaddr=0x81000000 fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr -bootargs=ubi.mtd=8 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(ubifs) +bootargs=rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs) bootcmd=echo starting OpenWrt ...;pfe stop;run qspi_boot bootdelay=3 diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index c2e091fb2a..70af95aa28 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -23,9 +23,8 @@ define Device/ls1012afrdm tfa-ls1012afrdm \ kmod-ppfe DEVICE_DTS := freescale/fsl-ls1012a-frdm - UBINIZE_OPTS := -E 5 BLOCKSIZE := 256KiB - PAGESIZE := 1 + FILESYSTEMS := squashfs IMAGE/firmware.bin := \ ls-clean | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ @@ -34,7 +33,7 @@ define Device/ls1012afrdm ls-append pfe.itb | pad-to 15M | \ ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to 32M | \ - append-ubi | check-size 67108865 + append-rootfs | pad-rootfs | check-size 67108865 KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb endef TARGET_DEVICES += ls1012afrdm From patchwork Tue Feb 25 19:07:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1244481 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=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.a=rsa-sha256 header.s=bombadil.20170209 header.b=JSmNUltJ; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.a=rsa-sha256 header.s=1024a header.b=BHN4xWzY; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RpPR0TJ7z9sRG for ; Wed, 26 Feb 2020 06:08:43 +1100 (AEDT) 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=YzVLeeMQsCqZlICKDEFae3+uhuPsJFix3Tgey7Wztkk=; b=JSmNUltJdByYsjeKz6Ce1Zypf8 5Vx4UZcJg4YaNIF526Gu0xRukakKkLIdIMy2u1lWeuxiTKVn2K+ajzdJCqu94lluwpf4oj895pV3j 9pAYMgF98swxeBq+N7oGTh4nPEJ4d0N8+c35+Ixb6pfG/XBszCFJUaO9RdZUp1UavpYyKg1KQ8vg1 9ikhm4Y3CorvMOKAYEgiv+XqBZcowG3BpZiTvlIdm9HPqX8Xc8/Ht+V7ArNusda0xkHPCtMRNbVu3 nuZ+Je+cWC4KZpIQ9EVZ3P0C2cm4WxcW47WWQOW6mA9sKzhJ3LVMe2ny/4oA3XMp/ibiFrkrCA+Wa MGhmyEsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fZO-0006j0-Ux; Tue, 25 Feb 2020 19:08:38 +0000 Received: from mx-out.tlen.pl ([193.222.135.145]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fYv-0006Bx-5v for openwrt-devel@lists.openwrt.org; Tue, 25 Feb 2020 19:08:13 +0000 Received: (wp-smtpd smtp.tlen.pl 16171 invoked from network); 25 Feb 2020 20:08:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1582657682; bh=1yn96EMij3AQTCGhLrcmc4peHhoHvAoWdLYKVpy1Rsc=; h=From:To:Subject; b=BHN4xWzYiDhgfxVDkgwRcI/n3w6rTV/VmKL4DbX/GbF+rOtr+3DYHgSD7Q71WPp6F UBFTnOZnJJd5K/AVePLaadQpIEfjG8+qhmFKyXOUxRtX90h9sIFMqgqvMCoFIup+Bf 6FSNs1IoF87LeCb7XiJtlW4wxJ//2KcK/7Vlwino= Received: from unknown (HELO localhost.localdomain) (tomek_n@o2.pl@[5.2.67.190]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 25 Feb 2020 20:08:02 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 25 Feb 2020 20:07:39 +0100 Message-Id: <20200225190741.113235-4-tomek_n@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200225190741.113235-1-tomek_n@o2.pl> References: <20200225190741.113235-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 25895b12c21f9cc23f8eea9f949cd842 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [0RPE] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_110809_377832_BCFD6FCD X-CRM114-Status: UNSURE ( 6.96 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tomek_n[at]o2.pl] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 4/6] layerscape: ls1012afrdm: introduce dynamic partitioning X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 Combine fixed sizes of "kernel" and "rootfs" partitions into one partition managed by OpenWrt splitter, it will allow better management of chip capacity and less maintenance burden when compiled kernel image will outgrow allocated size for kernel partition. This also changes kernel image format, since splitter only manages kernel and rootfs partitions, the dtb needs to be updated with the kernel, so for convenience, kernel is packed to FIT image. Signed-off-by: Tomasz Maciej Nowak --- package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt | 4 ++-- target/linux/layerscape/armv8_64b/config-4.14 | 2 ++ target/linux/layerscape/image/armv8_64b.mk | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt b/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt index 0f213d85e8..415155810e 100644 --- a/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt +++ b/package/boot/uboot-layerscape/files/ls1012afrdm-uEnv.txt @@ -2,7 +2,7 @@ fdtaddr=0x8f000000 loadaddr=0x81000000 fdt_high=0xffffffffffffffff initrd_high=0xffffffffffffffff -qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr -bootargs=rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(rootfs) +qspi_boot=sf probe 0:0;sf read $loadaddr 1000000 2800000;bootm $loadaddr +bootargs=rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),-(firmware) bootcmd=echo starting OpenWrt ...;pfe stop;run qspi_boot bootdelay=3 diff --git a/target/linux/layerscape/armv8_64b/config-4.14 b/target/linux/layerscape/armv8_64b/config-4.14 index 54e6d4cd9d..c1bd718366 100644 --- a/target/linux/layerscape/armv8_64b/config-4.14 +++ b/target/linux/layerscape/armv8_64b/config-4.14 @@ -630,6 +630,8 @@ CONFIG_MTD_NAND_FSL_IFC=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=16384 +CONFIG_MTD_SPLIT_FIRMWARE=y +CONFIG_MTD_SPLIT_FIT_FW=y CONFIG_MTD_SST25L=y CONFIG_MTD_UBI=y CONFIG_MTD_UBI_BEB_LIMIT=20 diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 70af95aa28..3a7b28c416 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -32,8 +32,9 @@ define Device/ls1012afrdm ls-append $(1)-uboot-env.bin | pad-to 10M | \ ls-append pfe.itb | pad-to 15M | \ ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ - append-kernel | pad-to 32M | \ + append-kernel | pad-to $$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | check-size 67108865 + KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb endef TARGET_DEVICES += ls1012afrdm From patchwork Tue Feb 25 19:07:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1244483 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=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.a=rsa-sha256 header.s=bombadil.20170209 header.b=ZsG+6flQ; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.a=rsa-sha256 header.s=1024a header.b=tTYNqA4C; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RpPv3ztKz9sQx for ; Wed, 26 Feb 2020 06:09:07 +1100 (AEDT) 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=fOY97gbDlo8oSoHM6lX9YCajFWyNSJ41ZxUyT6NBS+U=; b=ZsG+6flQrmvz11K+KdyVmRBqtQ ys/fBYDeUrWr1rfNCjQvdM/81jXqHl3jT4VWQcCb4Flgk4u+DKcmAievpxo/OvnfnU3oyQEjjTyAw ROHaAoJUAxwlh80ryby03Gh/IVRjvG+JvEdUiOE4zHZ8estchh39Uu/Xa9mJjo2iBySud5XZLRhpQ BHCegNW+eD2eGp3aKdZpq1/5rV488LGzo+utpn5alUHpnZiQ9xh6CJ0nj4pVUEWDiAUTIXDgYEo45 LOZEGFRAASs3FMwVR6a6uApP7FiMQ1AcJNWBQqxNSO9NqW6xWLFRZWovCQCiql66FyKceCtxPGBSx JpPWKenw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fZo-0007GJ-7Q; Tue, 25 Feb 2020 19:09:04 +0000 Received: from mx-out.tlen.pl ([193.222.135.145]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fYv-0006C0-6z for openwrt-devel@lists.openwrt.org; Tue, 25 Feb 2020 19:08:13 +0000 Received: (wp-smtpd smtp.tlen.pl 18801 invoked from network); 25 Feb 2020 20:08:03 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1582657683; bh=T6gsVpXwruTOGe9/SeP+uW58rtl6L63cr1QyUmKaOnI=; h=From:To:Subject; b=tTYNqA4Cx9BgYRRXSUcB0DDgOIxv00kO6uWzxl9WNCm5mRa5WzUPQkatBcXPp6JAb Pi4sxbCLGOAB4Wsw6CnU6yJjUVA4wl8++OT1HZkPGAXwKzIQ37QpWAKJjlsVucDbeR T2Zf3LOrLVSER7b1XrMSE9tN3Um2qMvGOttPyPbI= Received: from unknown (HELO localhost.localdomain) (tomek_n@o2.pl@[5.2.67.190]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 25 Feb 2020 20:08:03 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 25 Feb 2020 20:07:40 +0100 Message-Id: <20200225190741.113235-5-tomek_n@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200225190741.113235-1-tomek_n@o2.pl> References: <20200225190741.113235-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 51119028f4246391d829fa01f1c798c3 X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [wUN0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_110809_411485_84885B98 X-CRM114-Status: UNSURE ( 6.57 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tomek_n[at]o2.pl] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 5/6] layerscape: ls10121frdm: add sysupgrade X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 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 Instead of dangerous rewriting full chip with firmware.bin image to update OpenWrt, add sysupgrade image. This image will be used to update kernel and rootfs, leaving bootloader intact and making recovery possible, without resorting to external hardware tools. Signed-off-by: Tomasz Maciej Nowak --- target/linux/layerscape/base-files/lib/upgrade/platform.sh | 7 +++++++ target/linux/layerscape/image/armv8_64b.mk | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index c7b9b06cfe..a2ee81cf3a 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -32,6 +32,9 @@ platform_check_image() { nand_do_platform_check "traverse-ls1043" $1 return $? ;; + fsl,ls1012a-frdm) + return 0 + ;; *) echo "Sysupgrade is not currently supported on $board" ;; @@ -51,6 +54,10 @@ platform_do_upgrade() { traverse,ls1043s) platform_do_upgrade_traverse_nandubi "$1" ;; + fsl,ls1012a-frdm) + PART_NAME=firmware + default_do_upgrade "$1" + ;; *) echo "Sysupgrade is not currently supported on $board" ;; diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index 3a7b28c416..bd7055b3ee 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -25,6 +25,7 @@ define Device/ls1012afrdm DEVICE_DTS := freescale/fsl-ls1012a-frdm BLOCKSIZE := 256KiB FILESYSTEMS := squashfs + IMAGES += sysupgrade.bin IMAGE/firmware.bin := \ ls-clean | \ ls-append $(1)-bl2.pbl | pad-to 1M | \ @@ -34,8 +35,11 @@ define Device/ls1012afrdm ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \ append-kernel | pad-to $$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | check-size 67108865 + IMAGE/sysupgrade.bin := append-kernel | pad-to $$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | check-size 50331648 | append-metadata KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb KERNEL_INITRAMFS := kernel-bin | fit none $$(DTS_DIR)/$$(DEVICE_DTS).dtb + SUPPORTED_DEVICES := fsl,ls1012a-frdm endef TARGET_DEVICES += ls1012afrdm From patchwork Tue Feb 25 19:07:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1244480 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=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.a=rsa-sha256 header.s=bombadil.20170209 header.b=uI5gfnCn; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=o2.pl header.i=@o2.pl header.a=rsa-sha256 header.s=1024a header.b=j5qXoyTK; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48RpP75YdQz9sQx for ; Wed, 26 Feb 2020 06:08:27 +1100 (AEDT) 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:Cc: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:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FISAOoehhZflT4OMhgQO7wtus/BW0GWFbpiD1SM+nKs=; b=uI5gfnCnCPSzxr ez/sTuj+lR0Ggm4G97vhEiU6K2kG1paOklCxyM9OjcvovfYzUODFf6FRyIleVXYF7rJElDE1wHfNG X0qdHA75f88rHkH1vYIuQrCQFUG96uvtAwYdy2lX80QG02XOWJNsqq+XRIxHXVal0iGK0SAhOJAF5 OEG4fn5gkWmcpzKG7iAXzuUxXeQeaL23CScMjIc0Bot04b6i78brjAmDdFwdCOWcljG9PHhR/+6sl EZvVtWyVMgYRp9YxlK/3ykRgnss9/6YvlVHVeW1K88dhA3DGYO6uTIkC0zalZ72CNtbQpiSY1xNgm G8qBnUCvdhdCKFuq2weA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fZ9-0006Qu-SN; Tue, 25 Feb 2020 19:08:23 +0000 Received: from mx-out.tlen.pl ([193.222.135.145]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6fYu-0006CI-Mk for openwrt-devel@lists.openwrt.org; Tue, 25 Feb 2020 19:08:11 +0000 Received: (wp-smtpd smtp.tlen.pl 20575 invoked from network); 25 Feb 2020 20:08:03 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1582657684; bh=n5LzCAD6Y+OPqBqN7KeUqydRxm/sdpC9HiavuD/NnU0=; h=From:To:Cc:Subject; b=j5qXoyTKreemhdAxr22inH37YdyKodU6dtnn7+Q7MOYINS1gSmw5LkYXc9uCrY+Hn x8JfrEByq1PgtXISMxu5vU+5cNH3yTnulnXndTMZ+9dyFXbamrNhTb5CTww6DLwZxh BuPI2qZk9YO9aXnccNcNO7+ocHBr69HWPfvunBG8= Received: from unknown (HELO localhost.localdomain) (tomek_n@o2.pl@[5.2.67.190]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 25 Feb 2020 20:08:03 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Tue, 25 Feb 2020 20:07:41 +0100 Message-Id: <20200225190741.113235-6-tomek_n@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200225190741.113235-1-tomek_n@o2.pl> References: <20200225190741.113235-1-tomek_n@o2.pl> MIME-Version: 1.0 X-WP-MailID: 2fa99de992ff3b89955d934c3aa940ba X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [EaOk] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_110809_089439_094C3CA8 X-CRM114-Status: UNSURE ( 6.11 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.3 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tomek_n[at]o2.pl] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Subject: [OpenWrt-Devel] [PATCH 6/6] layerscape: sysupgrade: require metadata X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathew McBride Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Require the image metadata check so no invalid image could be fed to sysupgrade without force option. Cc: Mathew McBride Signed-off-by: Tomasz Maciej Nowak --- target/linux/layerscape/base-files/lib/upgrade/platform.sh | 2 ++ target/linux/layerscape/image/armv8_64b.mk | 1 + 2 files changed, 3 insertions(+) diff --git a/target/linux/layerscape/base-files/lib/upgrade/platform.sh b/target/linux/layerscape/base-files/lib/upgrade/platform.sh index a2ee81cf3a..013023295b 100644 --- a/target/linux/layerscape/base-files/lib/upgrade/platform.sh +++ b/target/linux/layerscape/base-files/lib/upgrade/platform.sh @@ -6,6 +6,8 @@ RAMFS_COPY_BIN="/usr/sbin/fw_printenv /usr/sbin/fw_setenv /usr/sbin/ubinfo /bin/echo" RAMFS_COPY_DATA="/etc/fw_env.config /var/lock/fw_printenv.lock" +REQUIRE_IMAGE_METADATA=1 + platform_do_upgrade_traverse_nandubi() { bootsys=$(fw_printenv bootsys | awk -F= '{{print $2}}') newbootsys=2 diff --git a/target/linux/layerscape/image/armv8_64b.mk b/target/linux/layerscape/image/armv8_64b.mk index bd7055b3ee..ff4846c9bf 100644 --- a/target/linux/layerscape/image/armv8_64b.mk +++ b/target/linux/layerscape/image/armv8_64b.mk @@ -291,5 +291,6 @@ define Device/traverse-ls1043 IMAGE/root = append-rootfs IMAGE/sysupgrade.bin = sysupgrade-tar | append-metadata MKUBIFS_OPTS := -m 2048 -e 124KiB -c 4096 + SUPPORTED_DEVICES := traverse,ls1043s traverse,ls1043v endef TARGET_DEVICES += traverse-ls1043