From patchwork Sun Mar 27 20:05:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1609922 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=rVzzw3Nv; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UG5PPVzR; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KRRjB1DGYz9sCq for ; Mon, 28 Mar 2022 07:08:30 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kCk6L1UwaiOEYQ94noPBBuf8cf5+ksPB/jZCc/xG03k=; b=rVzzw3NvL12coq 7GDWgyESM6ss1LyruLmnyIrxmQ5r1xSAKA3qPeMU7kwb3SttZcgWJDWpF+zzytQSKYTpZm/A3CA+C 8JNprDxIU3ZKQpbceiNtX8jlk+eughAm1aF0ALf+YAmQKEzuDqKEOipIfNvAj3pLLHX7nIXy3nE0x 7hn4WE5ygrWKRFA2WW6QvnG5WsXx9MWwTPv0p1cr0fO+u//8i0NaLZift6KnaDhWt1JryZzZUnbqT RV/PMeoNk68UU5xQ26qgiyay0SJerAgcZ4DvtK+6JDIR/YAH9JVl4MBOR/Tim9WXboJfu4CE4SmL/ 0CKyciyNqR/0dyeq71qA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ9T-006BEv-Uo; Sun, 27 Mar 2022 20:06:16 +0000 Received: from mail-lj1-x233.google.com ([2a00:1450:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ97-006B47-J4 for openwrt-devel@lists.openwrt.org; Sun, 27 Mar 2022 20:05:55 +0000 Received: by mail-lj1-x233.google.com with SMTP id 17so16631358ljw.8 for ; Sun, 27 Mar 2022 13:05:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=dnHNRc6jJACwBtxxKqqfLONqFi1Vk7uWazvx4UWMyD8=; b=UG5PPVzR2fDIHzY7YYbmT0+1DXq5r98koZ3W8febLSOdArf493NtLXNxo8biVcpzIF fuLaDCFR2ApI0geuZLfrEyd8SW6qqSAq9JLXXCyNkKtvKANOEi9qIa1UaNBMj6+fMMSd +YAH/U9dqNeLEJ3waAv47aRQjCCSTDEaXPzUzUsyLHDmROdrWC0CM1+7dE4wG1x7nnHf 7OmZIPyePMzubkgyoDUika/egyhzWaSNVtv71rp/pOFymRUgTTe+pNYz9uSlt8WLfxzJ v5N5j0Gnfg3I2iadnetQ1n52iuP+79jdilFa2eiKZMc7eRFG3ScJbabNlnwBivYZblOW kUJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dnHNRc6jJACwBtxxKqqfLONqFi1Vk7uWazvx4UWMyD8=; b=3mVXpSJbnIKrs9BWvyKsqr35ePOB5/cKDgkt22NCtiRmmTKWS7TQR3wntyf1BiqC1x WUu8Gt9CJTkoBWmrZ//1UWM+C94vxX7X1VYn6iWpPBd+EADtn0Oynxe+p5iEpZ1V3gAZ Z1pWBc0M5U1/b3eJ1C1FzVXgOS6HZYyLXPs1/cZceo1uiOnONfueVvxbhM6rykHAVf4W yT6kgK0+kqNwsGivk8U6dqLvIKvT8sshOezqzEwIWKlS55inacIa6vQ46J9aMMrU4ZLK PVfci8UjTfCfIWU1Fns2jaYuev1WhwaosJGy08dvuT1uA/tVhqJ4b4hLAreBfpbQgX1i np/g== X-Gm-Message-State: AOAM531/tSr4Q81biRDY0ZmSpReoVlYJDgGMo3Kp7s/IvzggKNmOEMgo G7Tjz1iYjPWm0LpZoscwXLfUl0ocLmWcCQ== X-Google-Smtp-Source: ABdhPJw2YocMqA2WN5lTLmqBro1HgEAlgmfYkJOqf8GWCfJqG/MMQiPJlkJn15BpY+Adfm3HhVsymg== X-Received: by 2002:a2e:bf25:0:b0:247:d216:43fc with SMTP id c37-20020a2ebf25000000b00247d21643fcmr17044297ljr.520.1648411551285; Sun, 27 Mar 2022 13:05:51 -0700 (PDT) Received: from localhost.localdomain ([212.106.161.171]) by smtp.googlemail.com with ESMTPSA id i3-20020a198c43000000b00448a1566977sm1440445lfj.275.2022.03.27.13.05.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 13:05:50 -0700 (PDT) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 1/7] ath79: jj76pf2: enable TCN75 sensor Date: Sun, 27 Mar 2022 22:05:28 +0200 Message-Id: <20220327200534.377029-2-tmn505@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327200534.377029-1-tmn505@gmail.com> References: <20220327200534.377029-1-tmn505@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_130553_663774_D3C294B7 X-CRM114-Status: GOOD ( 10.47 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This SBC has Microchip TCN75 sensor, wich measures ambient temperature. Specify it in dts to allow readout by applications using kernel hwmon API. Signed-off-by: Tomasz Maciej Nowak --- target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts | 13 +++++++++++++ target/linux/ath79/image/generic.mk | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:233 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This SBC has Microchip TCN75 sensor, wich measures ambient temperature. Specify it in dts to allow readout by applications using kernel hwmon API. Signed-off-by: Tomasz Maciej Nowak --- target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts | 13 +++++++++++++ target/linux/ath79/image/generic.mk | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts index 826b45ff513e..93a029964a63 100644 --- a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts +++ b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts @@ -32,6 +32,19 @@ clock-frequency = <40000000>; }; + i2c { + compatible = "i2c-gpio"; + sda-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + scl-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + #address-cells = <1>; + #size-cells = <0>; + + sensor@48 { + compatible = "microchip,tcn75"; + reg = <0x48>; + }; + }; + leds { compatible = "gpio-leds"; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 769c0ee1dab5..9d94c79212cc 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1452,7 +1452,7 @@ define Device/jjplus_ja76pf2 SOC := ar7161 DEVICE_VENDOR := jjPlus DEVICE_MODEL := JA76PF2 - DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-basic-wolfssl -uboot-envtools fconfig + DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-basic-wolfssl -uboot-envtools fconfig kmod-hwmon-lm75 IMAGES += kernel.bin rootfs.bin IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-rootfs | pad-rootfs From patchwork Sun Mar 27 20:05:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1609925 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=dWyxgvqj; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=QNBXlN35; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KRRm51XNjz9sCq for ; Mon, 28 Mar 2022 07:11:01 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3YQTfJ5r10hhdbibUKqZwR1kXz8x2QYB8p0sSGHyZU8=; b=dWyxgvqjvYXCYA OD41u9rrw9sfTxPiBRhtKq/Yv9MIggUUM8mvIQnfOtiaJXUU4SWjbB0VpcRmJIjDcpdNitFafNUGo u9OUAjop8gDZW0lnFDha1cmfK1UDL6TwUrQeSRIs7jxEcLGCcbIFWl2DgyCLFhK8Y93EGBk4OeG+e giUl+5GfrM79SUx0k9lv1Cubm0hzWKWDJW99p2rk5h+ds9R1eIo7VMcmxuHSGqq1GcMBzpjp/G3rQ GLmBQdaqT2SjdQrCNGzae8jrj+IemQJ2Iow2dyMNYJnYl8WiHtK5cYeUQzIeD60RiZolmOwDtLT4z 9RozWDYf8FrY2rE4I54A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZBt-006C1P-CA; Sun, 27 Mar 2022 20:08:46 +0000 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ97-006B4Q-Mi for openwrt-devel@lists.openwrt.org; Sun, 27 Mar 2022 20:05:57 +0000 Received: by mail-lf1-x130.google.com with SMTP id bt26so21475399lfb.3 for ; Sun, 27 Mar 2022 13:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=k8idzpgmTouTXctnE1gEPF8C/EbrESEyNC89Zgd9iv0=; b=QNBXlN35Vb11K7R4ZxAXu7Rlte2DRj4Jj7Ws+Sd7i5drybJ+gVDPxQFfvThGjx0/pz 2o8y7W3J4DKQFv8lvWK8cy+YefHH/I6xPneWsTzrExZRNQS0NLxF+BCVrriRu8mCChqB XLUazqCP9o4zZMF7ux2p2+aCWigPSEoT1PUAlhWskY3B9Hq3B8wen2v2K36UGhQEQJPJ FXSX6VWpDfM1AXd50+e2lYvihANh9clqKZ/5njO3v7N6ckFMaJnQU0Rb0W8viGmyF5uc 98FBMKoefRloDkRignIPvyRKIjkL/gVQR5YM+5JdfUzLjz4Ph8PcOp2KT2MIWPDndKTr 4tAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k8idzpgmTouTXctnE1gEPF8C/EbrESEyNC89Zgd9iv0=; b=R1Gf20ZUJ3J9dYj9H5utO+PGERlIeiNuOdwRAUTPBbj9UfIai0QwNY3t9iGNSNEewy 0ZdzsEquygMOo5WA+CIdW+jzVeK/sR8SqFYIo7LLFlZu9Wp80TmlcUGDsO0dn2pfFKfG JF2Hu406x5SIYXNGiZ1XS8zxHrBjI/CM5eWYSDObprkwa/K2Rlxw09uZ+FcVcRSr10Xk HxRPaagJ14CO/pr6lPWWI3PlCjTOZjr5M/pVXV/dOHo/l6ilKtkvm3dK1jqBxYTxv8Bp 05e5ABxyA1y6Dq9f3GIjwA62Iv1XBFRqus0gND+hY4ZEh6dut/Ux0+4je0w7TLfxEG+f 8vDw== X-Gm-Message-State: AOAM531Vpp2JFNZnucdTOt+Po4eYqZlzC/Piwf1g8Wx+XyJVC404o7sZ w8prvs7DrGPpcmUVLbF61DW5eMxM4o95Nw== X-Google-Smtp-Source: ABdhPJzOUSZrSZAb0d9DlxBUgPZpMLDsdkY+NjhDntPDg1gI3KbZ5ys7jRJf9sKv8829wtaI1tFmKA== X-Received: by 2002:a05:6512:16aa:b0:443:bf59:5a4d with SMTP id bu42-20020a05651216aa00b00443bf595a4dmr17019363lfb.622.1648411551884; Sun, 27 Mar 2022 13:05:51 -0700 (PDT) Received: from localhost.localdomain ([212.106.161.171]) by smtp.googlemail.com with ESMTPSA id i3-20020a198c43000000b00448a1566977sm1440445lfj.275.2022.03.27.13.05.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 13:05:51 -0700 (PDT) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 2/7] ath79: switch some RedBoot based divices to OKLI loader Date: Sun, 27 Mar 2022 22:05:29 +0200 Message-Id: <20220327200534.377029-3-tmn505@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327200534.377029-1-tmn505@gmail.com> References: <20220327200534.377029-1-tmn505@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_130553_854971_80DF13A8 X-CRM114-Status: GOOD ( 17.91 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: After the kernel has switched version to 5.10, JA76PF2 and RouterStations lost the capability to sysupgrade the OpenWrt version. The cause is the lack of porting the patches responsible for partial fl [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:130 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org After the kernel has switched version to 5.10, JA76PF2 and RouterStations lost the capability to sysupgrade the OpenWrt version. The cause is the lack of porting the patches responsible for partial flash erase block writing and these boards FIS directory and RedBoot config partitions share the same erase block. Because of that the FIS directory can't be updated to accommodate kernel/rootfs partition size changes. This could be remedied by bootloader update, but it is very intrusive and could potentially lead to non-trivial recovery procedure, if something went wrong. The less difficult option is to use OpenWrt kernel loader, which will let us use static partition sizes and employ mtd splitter, to dynamically adjust kernel and rootfs partition sizes. On sysupgrade from ath79 19.07 or 21.02 image, which still let to modify FIS directory, the loader will be written to kernel partition, while the kernel+rootfs to rootfs partition. The caveats are: * image format changes, no possible upgrade from ar71xx target images * downgrade to any older OpenWrt version will require TFTP recovery or usage of bootloader command line interface To downgrade to 19.07 or 21.02, or to upgrade if one is already on OpenWrt with kernel 5.10, for RouterStations use TFTP recovery procedure. For JA76PF2 use instructions from this commit message: 0cc87b3bacee (" ath79: image: disable sysupgrade images for routerstations and ja76pf2"), replacing kernel image with loader (loader.bin suffix) and rootfs image with firmware (firmware.bin suffix). Fixes: 15aa53d7ee65 ("ath79: switch to Kernel 5.10") Signed-off-by: Tomasz Maciej Nowak --- .../linux/ath79/dts/ar7161_jjplus_ja76pf2.dts | 39 ++++++++++++++++++- .../ath79/dts/ar7161_ubnt_routerstation.dtsi | 35 ++++++++++++++++- .../etc/uci-defaults/05_fix-compat-version | 5 ++- .../base-files/lib/upgrade/platform.sh | 20 +++++----- target/linux/ath79/image/Makefile | 8 ---- target/linux/ath79/image/generic-ubnt.mk | 26 ++++++++----- target/linux/ath79/image/generic.mk | 25 ++++++++---- 7 files changed, 120 insertions(+), 38 deletions(-) diff --git a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts index 93a029964a63..bcb017c88c54 100644 --- a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts +++ b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts @@ -4,6 +4,7 @@ #include #include +#include / { model = "jjPlus JA76PF2"; @@ -124,9 +125,45 @@ spi-max-frequency = <25000000>; partitions { + compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; - compatible = "ecoscentric,redboot-fis-partitions"; + + partition@0 { + label = "RedBoot"; + reg = <0x000000 0x040000>; + read-only; + }; + + partition@40000 { + label = "loader"; + reg = <0x040000 0x020000>; + }; + + partition@60000 { + label = "firmware"; + reg = <0x060000 0xf80000>; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = ; + }; + + partition@fe0000 { + label = "FIS directory"; + reg = <0xfe0000 0x00f000>; + read-only; + }; + + partition@fef000 { + label = "RedBoot config"; + reg = <0xfef000 0x001000>; + read-only; + }; + + partition@ff0000 { + label = "Atheros Board Data"; + reg = <0xff0000 0x10000>; + read-only; + }; }; }; }; diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi index 116bc9cfc2ff..172b0af1eb3b 100644 --- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi +++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi @@ -4,6 +4,7 @@ #include #include +#include / { aliases { @@ -62,7 +63,39 @@ spi-max-frequency = <25000000>; partitions { - compatible = "ecoscentric,redboot-fis-partitions"; + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "RedBoot"; + reg = <0x000000 0x030000>; + read-only; + }; + + partition@30000 { + label = "loader"; + reg = <0x030000 0x020000>; + }; + + partition@50000 { + label = "firmware"; + reg = <0x050000 0xfa0000>; + compatible = "openwrt,uimage", "denx,uimage"; + openwrt,ih-magic = ; + }; + + partition@ff0000 { + label = "FIS directory"; + reg = <0xff0000 0x00f000>; + read-only; + }; + + partition@fff000 { + label = "RedBoot config"; + reg = <0xfff000 0x001000>; + read-only; + }; }; }; }; diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/ath79/generic/base-files/etc/uci-defaults/05_fix-compat-version index a6b7fa31621b..6646b7e5e7b1 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/05_fix-compat-version +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/05_fix-compat-version @@ -1,8 +1,11 @@ . /lib/functions.sh case "$(board_name)" in + jjplus,ja76pf2|\ meraki,mr12|\ - meraki,mr16) + meraki,mr16|\ + ubnt,routerstation|\ + ubnt,routerstation-pro) uci set system.@system[0].compat_version="2.0" uci commit system ;; diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh index 953d6a96d36f..642a9891ff29 100644 --- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh @@ -14,21 +14,21 @@ redboot_fis_do_upgrade() { local kern_part="$2" local magic=$(get_magic_word "$sysup_file") - if [ "$magic" = "4349" ]; then - local kern_length=0x$(dd if="$sysup_file" bs=2 skip=1 count=4 2>/dev/null) + if [ "$magic" = "7379" ]; then + local board_dir=$(tar tf $sysup_file | grep -m 1 '^sysupgrade-.*/$') [ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUP" - dd if="$sysup_file" bs=64k skip=1 2>/dev/null | \ - mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs - elif [ "$magic" = "7379" ]; then - local board_dir=$(tar tf $sysup_file | grep -m 1 '^sysupgrade-.*/$') - local kern_length=$(tar xf $sysup_file ${board_dir}kernel -O | wc -c) + if grep -q "mtd1.*loader" /proc/mtd; then + tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ + mtd -r $append write - loader:firmware - [ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUP" - tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ - mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs + else + local kern_length=$(tar xf $sysup_file ${board_dir}kernel -O | wc -c) + tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ + mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs + fi else echo "Unknown image, aborting!" return 1 diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index 768ec5704490..32a4b2abed05 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -8,14 +8,6 @@ DEVICE_VARS += LOADER_FLASH_MAX LOADER_KERNEL_MAGIC DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION -define Build/combined-image - sh $(TOPDIR)/scripts/combined-image.sh \ - "$(IMAGE_KERNEL)" \ - "$@" \ - "$@.new" - @mv $@.new $@ -endef - define Build/loader-common rm -rf $@.src $(MAKE) -C lzma-loader \ diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 0b613df62b4e..6570d2c170a1 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -10,7 +10,7 @@ UBNT_REVISION := $(VERSION_DIST)-$(REVISION) define Build/mkubntimage -$(STAGING_DIR_HOST)/bin/mkfwimage -B $(UBNT_BOARD) \ -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \ - -k $(IMAGE_KERNEL) -r $@ -o $@ + -k $(if $(1),$(1),$(IMAGE_KERNEL)) -r $@ -o $@ endef define Build/mkubntimage2 @@ -386,14 +386,24 @@ define Device/ubnt_routerstation_common kmod-usb2 fconfig DEVICE_VENDOR := Ubiquiti SOC := ar7161 - IMAGE_SIZE := 16128k + LOADER_TYPE := bin + LOADER_FLASH_OFFS := 0x50000 + COMPILE := loader-$(1).bin + COMPILE/loader-$(1).bin := loader-okli-compile | lzma | pad-to 128k + IMAGE_SIZE := 16000k IMAGES += factory.bin - IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | \ - check-size - IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \ - check-size | append-metadata - KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE) + IMAGE/factory.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | \ + mkubntimage $$$$(KDIR)/loader-$(1).bin | check-size + IMAGE/sysupgrade.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | check-size | \ + sysupgrade-tar kernel=$$$$(KDIR)/loader-$(1).bin rootfs=$$$$@ | append-metadata + KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (19.07 and 21.02) \ + due to kernel drivers restrictions. Upgrade via sysupgrade mechanism is one way operation. \ + Downgrading OpenWrt version will involve usage of TFTP recovery or bootloader command line interface. endef define Device/ubnt_routerstation @@ -403,7 +413,6 @@ define Device/ubnt_routerstation UBNT_TYPE := RSx UBNT_CHIP := ar7100 DEVICE_PACKAGES += -swconfig - SUPPORTED_DEVICES += routerstation endef TARGET_DEVICES += ubnt_routerstation @@ -413,7 +422,6 @@ define Device/ubnt_routerstation-pro UBNT_BOARD := RSPRO UBNT_TYPE := RSPRO UBNT_CHIP := ar7100pro - SUPPORTED_DEVICES += routerstation-pro endef TARGET_DEVICES += ubnt_routerstation-pro diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 9d94c79212cc..24bd12d652b6 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1453,15 +1453,24 @@ define Device/jjplus_ja76pf2 DEVICE_VENDOR := jjPlus DEVICE_MODEL := JA76PF2 DEVICE_PACKAGES += -kmod-ath9k -swconfig -wpad-basic-wolfssl -uboot-envtools fconfig kmod-hwmon-lm75 - IMAGES += kernel.bin rootfs.bin - IMAGE/kernel.bin := append-kernel - IMAGE/rootfs.bin := append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \ - check-size | append-metadata - KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE) + LOADER_TYPE := bin + LOADER_FLASH_OFFS := 0x60000 + COMPILE := loader-$(1).bin + COMPILE/loader-$(1).bin := loader-okli-compile | lzma | pad-to 128k + ARTIFACTS := loader.bin + ARTIFACT/loader.bin := append-loader-okli $(1) + IMAGES += firmware.bin + IMAGE/firmware.bin := append-kernel | uImage lzma -M 0x4f4b4c49 | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | pad-to $$$$(BLOCKSIZE) | check-size + IMAGE/sysupgrade.bin := $$(IMAGE/firmware.bin) | \ + sysupgrade-tar kernel=$$$$(KDIR)/loader-$(1).bin rootfs=$$$$@ | append-metadata + KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb - IMAGE_SIZE := 16000k - SUPPORTED_DEVICES += ja76pf2 + IMAGE_SIZE := 15872k + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := Partition design has changed compared to older versions (19.07 and 21.02) \ + due to kernel drivers restrictions. Upgrade via sysupgrade mechanism is one way operation. \ + Downgrading OpenWrt version will involve usage of bootloader command line interface. endef TARGET_DEVICES += jjplus_ja76pf2 From patchwork Sun Mar 27 20:05:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1609924 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=ExyO/Kpq; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=SFWLjv5s; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KRRl142Kqz9sCq for ; Mon, 28 Mar 2022 07:10:05 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=atCxJcx79HB28QixLdvJFDbbxieSO1EvNTwDnLaQp8c=; b=ExyO/KpqHjTHWJ cWJh+fXm7xG1eaB10U5486ZvuSdzbZwSTsGJYelvXpVGeC6kfCaD0zBumia+kkbgtCs1LHUuRA4em Uf8WMrWATuopU1BViE5iqFqKcx3TKtw7KcpgdRSq5x1SL4DUnoj2pO1jzWVE5DhBOPwhNw5s6G88C NNV/bqpgYQ6bvAb6qsgwnotFUnyYG44s79XQDP1e4ygtgVVmw18IaBEXCmBWBa80LYxI5imZoZ0O+ cyD6kSVH/szRAB7B8u3Yr+yCzJIXOqBBHGq6mpXMezH5v2+PcchxPSwYF2GE7m8iVYP7UXhSS1z0p FWYNDav1eEtxaBqyPEPw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZB1-006BiM-Mt; Sun, 27 Mar 2022 20:07:52 +0000 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ98-006B4h-2a for openwrt-devel@lists.openwrt.org; Sun, 27 Mar 2022 20:05:56 +0000 Received: by mail-lf1-x134.google.com with SMTP id m3so21451277lfj.11 for ; Sun, 27 Mar 2022 13:05:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=gFqhiabS6ZBROw0facyxdHF/YuiSgsec7ZU7qBir4wU=; b=SFWLjv5sn2tLSgE+OQeHcKJV8pydXYNRyedNVMdKWrol2nnxiM0ZblhGQM9BlJ/Xsq 9nWKGTXgROQ8V1PL7h1gW2V6QfhB7sqZxHFwZj+TxJjr2TXFbenTyPx60/Zrfsa7W0td ofFvNgTdPcTVIaSmN7Ay6IX6BccjE/NazuAllmhq6p9V1FRIE1sOamGtGCrhm+QMqoOO Clw1KrdgJRIU6In3GG8KO8xUTetOifnyKck3T8Mac87Ihk3DrKPsUGvpXQOmvb5c2DhT V9yMlRAwSohgExmCU1VeHcEGZaY7x6KxpoLNVcZq3HStc+6zjpdYHW2rPibVP4Ado9s/ iIRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gFqhiabS6ZBROw0facyxdHF/YuiSgsec7ZU7qBir4wU=; b=1vkzR9asAcGTwpC5DwgmDYnY18E2k7Rmsy9VrZaKOztQe5arNTQO6EWApIlGhW/zst 3u37Dq8ORQjEkTqo5GmYiLcmnL92MBgQJrnpTDzTeAtD8xhfqb5Lw8dC6lPZb2wtA9xK EKspMju5VVY50QUPHuuotTr8EnRgzP1HLufGgZFla0XjGZvfuObojZOUz2omw1p2JWWt yZvKiYv7VglspdcKcHXrCwC4jtS4Jw4xNvnAnnsFF4Mc3L2CXd8dMeIgLeztL2uTuN9B lSpeW2Te3HfaooWZ4p0yIXXfbKl+yaxRwQb3drqTXrPV3rLKC+iL7VrgTtXqkKPnv1gQ MCCw== X-Gm-Message-State: AOAM530K4UmYiaVBpg3b3bD/YLUN5vzCDNDKaGkMsOFcCyVkcWmo4IBt JWtlNrvLSgl2E6z3XzvFc0JaCssFIBkkmw== X-Google-Smtp-Source: ABdhPJxvMh/ItYOHQjcKIJ5cR8ACe6LrhTwx1huVbH2/QnMYYMa3wwPVEV3fy1hSd6jWmyHyM9djuw== X-Received: by 2002:ac2:51c6:0:b0:44a:5e41:b284 with SMTP id u6-20020ac251c6000000b0044a5e41b284mr16184080lfm.582.1648411552466; Sun, 27 Mar 2022 13:05:52 -0700 (PDT) Received: from localhost.localdomain ([212.106.161.171]) by smtp.googlemail.com with ESMTPSA id i3-20020a198c43000000b00448a1566977sm1440445lfj.275.2022.03.27.13.05.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 13:05:52 -0700 (PDT) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 3/7] ath79: move image check for devices with RedBoot Date: Sun, 27 Mar 2022 22:05:30 +0200 Message-Id: <20220327200534.377029-4-tmn505@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327200534.377029-1-tmn505@gmail.com> References: <20220327200534.377029-1-tmn505@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_130554_151656_DA4F433B X-CRM114-Status: GOOD ( 15.91 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Don't comence the switch to RAMFS when the image format is wrong. This led to rebooting the device, which could lead to false impression that upgrade succeded. Being here, factor out the code responsi [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:134 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Don't comence the switch to RAMFS when the image format is wrong. This led to rebooting the device, which could lead to false impression that upgrade succeded. Being here, factor out the code responsible for upgrading RedBoot devices to separate file. Signed-off-by: Tomasz Maciej Nowak --- .../base-files/lib/upgrade/platform.sh | 46 ++++++------------- .../base-files/lib/upgrade/redboot-fis.sh | 31 +++++++++++++ 2 files changed, 46 insertions(+), 31 deletions(-) create mode 100644 target/linux/ath79/generic/base-files/lib/upgrade/redboot-fis.sh diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh index 642a9891ff29..f161540a6877 100644 --- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh @@ -8,35 +8,19 @@ REQUIRE_IMAGE_METADATA=1 RAMFS_COPY_BIN='fw_printenv fw_setenv' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' -redboot_fis_do_upgrade() { - local append - local sysup_file="$1" - local kern_part="$2" - local magic=$(get_magic_word "$sysup_file") - - if [ "$magic" = "7379" ]; then - local board_dir=$(tar tf $sysup_file | grep -m 1 '^sysupgrade-.*/$') - - [ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUP" - - if grep -q "mtd1.*loader" /proc/mtd; then - tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ - mtd -r $append write - loader:firmware - - else - local kern_length=$(tar xf $sysup_file ${board_dir}kernel -O | wc -c) - - tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ - mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs - fi - else - echo "Unknown image, aborting!" - return 1 - fi -} - platform_check_image() { - return 0 + local board=$(board_name) + + case "$board" in + jjplus,ja76pf2|\ + ubnt,routerstation|\ + ubnt,routerstation-pro) + platform_check_image_redboot_fis "$1" + ;; + *) + return 0 + ;; + esac } platform_do_upgrade() { @@ -45,7 +29,7 @@ platform_do_upgrade() { case "$board" in adtran,bsap1800-v2|\ adtran,bsap1840) - redboot_fis_do_upgrade "$1" vmlinux_2 + platform_do_upgrade_redboot_fis "$1" vmlinux_2 ;; allnet,all-wap02860ac|\ araknis,an-300-ap-i-n|\ @@ -66,7 +50,7 @@ platform_do_upgrade() { platform_do_upgrade_failsafe_datachk "$1" ;; jjplus,ja76pf2) - redboot_fis_do_upgrade "$1" linux + platform_do_upgrade_redboot_fis "$1" linux ;; openmesh,a40|\ openmesh,a60|\ @@ -98,7 +82,7 @@ platform_do_upgrade() { ;; ubnt,routerstation|\ ubnt,routerstation-pro) - redboot_fis_do_upgrade "$1" kernel + platform_do_upgrade_redboot_fis "$1" kernel ;; *) default_do_upgrade "$1" diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/redboot-fis.sh b/target/linux/ath79/generic/base-files/lib/upgrade/redboot-fis.sh new file mode 100644 index 000000000000..f45d9a2e790e --- /dev/null +++ b/target/linux/ath79/generic/base-files/lib/upgrade/redboot-fis.sh @@ -0,0 +1,31 @@ +platform_check_image_redboot_fis() { + if [ "$(get_magic_word "$1")" != "7379" ]; then + v "Unknown image format, aborting!" + return 1 + else + return 0 + fi +} + +platform_do_upgrade_redboot_fis() { + local append + local sysup_file="$1" + local kern_part="$2" + + if [ "$(get_magic_word "$sysup_file")" = "7379" ]; then + local board_dir=$(tar tf $sysup_file | grep -m 1 '^sysupgrade-.*/$') + + [ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUP" + + if grep -q "mtd1.*loader" /proc/mtd; then + tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ + mtd -r $append write - loader:firmware + + else + local kern_length=$(tar xf $sysup_file ${board_dir}kernel -O | wc -c) + + tar xf $sysup_file ${board_dir}kernel ${board_dir}root -O | \ + mtd -r $append -F$kern_part:$kern_length:0x80060000,rootfs write - $kern_part:rootfs + fi + fi +} From patchwork Sun Mar 27 20:05:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1609920 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=MGuOE/5i; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ekFo4qV7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KRRj556Xqz9sFt for ; Mon, 28 Mar 2022 07:08:25 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=H/H7ahAR5mXi3c4/pJAXUiu7jzUM4CnkAASxUX+4GK4=; b=MGuOE/5iYhcXdC Nfn5nchGxDeP6iU2kJ8HQcSvD+jzmiiZ2lPEwcRSkf/vpbOskGVMcBmFF0rqzh+N+SQMXOoMj4KG0 N2VGyElX7I+oKLTOGj16qar2F3/f3V2uKNgF5OuDdEtiLZvmuEYz8/mAYwnGioX+DxXsD1bPxgZ++ k1YMNLoRiRnKm/HCe56XVrbFA7blppDAWMJSCp+M/91yB9s0kpj5Gu4eOcpis7rNtfSMLjibGZakZ X05RDvhHfRax/hCAyjF4RZft8dJgjB1ka3FSHzmUrhKI8NfG19ZDGKpdFof0lFK0KBjhZafN4S3zF KH6aeMV81JqhN/5CF0og==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ9s-006BMe-Om; Sun, 27 Mar 2022 20:06:41 +0000 Received: from mail-lj1-x235.google.com ([2a00:1450:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ98-006B56-Ky for openwrt-devel@lists.openwrt.org; Sun, 27 Mar 2022 20:05:56 +0000 Received: by mail-lj1-x235.google.com with SMTP id c15so16619506ljr.9 for ; Sun, 27 Mar 2022 13:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=RieXwSctLa2QQeWIhvKPBhnMnRubVvYVQE08uW90gws=; b=ekFo4qV7wPdeK8wQtADzt/k2ysWQ1OYWhjcyGibxJ04Z79ZLU/Itlk5ZGEXb8DzTZl 2cmKiGo4YdRbPqH1Vsl9VCYPOKLNLuaOs2SiwE2HRldYpdeXOjcr0s8fj/3LIZm1QFnj i4Iyo11JfDrfLDhORR+5GnOTGYkM2Kp42dagit4HB6BiEbGDoEpdgNwJwDIuet656Hie JB4huwTggIZAySDYif1eMKAv7R9u91iGhxMTuxQgm7D+6Bn+Z1s8K7Pw8MK0pHlHYRaa hQ2NLAycjeGnwYZ/SL2tkA6+BKbHYg7WiJnXNG+GNc/SDyVa1qRPcxv816O/BgzBU/Xq g4vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RieXwSctLa2QQeWIhvKPBhnMnRubVvYVQE08uW90gws=; b=2iG4LAkGtreXXfWwsL7pvIZ48jE22g4p+fW3W1ef50muWkxLqptrchj8cDA4xbA+ls WnWMIZWWXJ7eSQ3UFyrAL0erOOciiY2NwpBWAiw106Vwh0wI/cV2IdQqaFuc8M0LiJRk zKLJy4/zdfWiaUM5QOAJyrBsQ2NknaVt1d384pOiRZT92muFSLmG0eCUCJc7/LVe6DGX ChRpJmApq4SrkEk/y4e0Lw2O/4SEQWOXmMkpTxjoH2L9Qbh8+63bqVcVKTuwg4OW6aYT gbdM8GKtnJ/3Jq9LevoZ3JNfeqZc5ogh394mNrJeYlKksByGBS1D9ldGeCzy+hV8F2t+ F3kg== X-Gm-Message-State: AOAM531Vd+6f0GowLwwkXAn4uSEUudMhzK6FUqWkwb/S5q+cD8B1DrTe UYG1LTkyBPPzCYIcO+vyVJMTBHeI8LtoLg== X-Google-Smtp-Source: ABdhPJxMnK8L5KZW2TBaSf1GY37SaI0ccHsHFAwImwSRqbLofBHkSBtnhHJE9pEFQQFQhGVPXSuK7w== X-Received: by 2002:a2e:8007:0:b0:24a:c2d6:50c7 with SMTP id j7-20020a2e8007000000b0024ac2d650c7mr7729719ljg.94.1648411553051; Sun, 27 Mar 2022 13:05:53 -0700 (PDT) Received: from localhost.localdomain ([212.106.161.171]) by smtp.googlemail.com with ESMTPSA id i3-20020a198c43000000b00448a1566977sm1440445lfj.275.2022.03.27.13.05.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 13:05:52 -0700 (PDT) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 4/7] ath79: ja76pf2: use nvmem cells to specify MAC adresses Date: Sun, 27 Mar 2022 22:05:31 +0200 Message-Id: <20220327200534.377029-5-tmn505@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327200534.377029-1-tmn505@gmail.com> References: <20220327200534.377029-1-tmn505@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_130554_731340_A5EA057A X-CRM114-Status: GOOD ( 10.83 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The bootloader on this board hid the partition containig MAC addresses and prevented adding this space to FIS directory, therefore those had to be stored in RedBoot configuration as aliases to be able [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:235 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The bootloader on this board hid the partition containig MAC addresses and prevented adding this space to FIS directory, therefore those had to be stored in RedBoot configuration as aliases to be able to assigne them to proper interfaces. Now that fixed partition size are used instead of redboot-fis parser, the partition containig MAC adresses could be specified, and with marking it as nvmem cell, we can assign them without userspace involvement. Signed-off-by: Tomasz Maciej Nowak --- target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts | 15 +++++++++++++++ .../generic/base-files/etc/board.d/02_network | 4 ---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts index bcb017c88c54..a3d66da61414 100644 --- a/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts +++ b/target/linux/ath79/dts/ar7161_jjplus_ja76pf2.dts @@ -103,12 +103,16 @@ ð0 { status = "okay"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy0>; }; ð1 { status = "okay"; + nvmem-cells = <&macaddr_wan>; + nvmem-cell-names = "mac-address"; phy-handle = <&phy4>; }; @@ -163,6 +167,17 @@ label = "Atheros Board Data"; reg = <0xff0000 0x10000>; read-only; + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_wan: macaddr@1000 { + reg = <0x1000 0x6>; + }; + + macaddr_lan: macaddr@1006 { + reg = <0x1006 0x6>; + }; }; }; }; diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index bc32081910f8..a1d0a922c8b9 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -651,10 +651,6 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr) label_mac=$wan_mac ;; - jjplus,ja76pf2) - wan_mac=$(fconfig -s -r -d $(find_mtd_part "RedBoot config") -n alias/ethaddr) - lan_mac=$(macaddr_add "$wan_mac" 1) - ;; mercury,mw4530r-v1|\ tplink,tl-wdr3600-v1|\ tplink,tl-wdr4300-v1|\ From patchwork Sun Mar 27 20:05:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1609923 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=fDWvDFaV; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=Q8I2xq2+; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KRRkM1CwPz9sCq for ; Mon, 28 Mar 2022 07:09:31 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t3sN1pfFh2i7vu/GRbJX6DqjrONfw4nMMVmCyeVR2pM=; b=fDWvDFaVM1PDwm Wvmj4HXxWGsCVkdPTkBBuEeoZJZRTbdesb3EItBV025t3uWNl/2gxrkdXO5iiNlZBPpp4ostRg+Jp aF+kUqwBqtenZebvvhhUr6HTPDva5hVVEuriBUNs9dgNS4PypQIGwMi6OoYBI40ZdV14nlfW0u2FZ gikZBrOOGboZ+5s+nFAAvJCvOLQ8gWKKdS07w6ZDTGiEtur0frrdi/Lby7OayXRY+vzUzc+5tMmuT P+OEjM1GOm5iG1vEsFRH7bEPM8VCfkH8ItSv6O/Qxp0mDWhNwazuH1MmD0HeUWOmcDlG5HnyW7eQh 3yGBNVUepxd8Xn4gdeHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZAP-006BVm-0w; Sun, 27 Mar 2022 20:07:13 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ99-006B6H-VK for openwrt-devel@lists.openwrt.org; Sun, 27 Mar 2022 20:05:57 +0000 Received: by mail-lf1-x131.google.com with SMTP id e16so21437073lfc.13 for ; Sun, 27 Mar 2022 13:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Kb5x550rhiK1zSaUQ5PfXleYSz1Pjxx6vmJokA+P6rw=; b=Q8I2xq2+xpMrXzSS4udIs1TWogIzxpRY1bx4adAWhWtKCpKqAeiXv7ikKhl5+NVgrq Z9L1YbmsdtOkGBMmY75g3tYhpL0kviIk+rpkQB+N3D5nwoUhr6N/dCGnXmNgpDOOh931 ZNj49LK9n07MJ98+6ygKDgG9mWUrS5PXOwPAvjUMtk46m8HcLQJTOAx3iPh+Q21IJAUf YJSnW9TZZYdghbPaxyujhfv7TUqlQoNNMRPFfbF7+HxKey7jfbXJbXwZh4XLgjSfpm45 8qkmO4c9UABJxx4s5D+Saywq5BIpy6XD/EIZsG53CTfCKcu8kMlT6Kuv8l6n+/wCIR+2 mQIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kb5x550rhiK1zSaUQ5PfXleYSz1Pjxx6vmJokA+P6rw=; b=ZPcJpwTkfBcFAl39DrNqwK2S39RBmoXB+zLN+voJnHzIRpXWY97dBKFCtZOIpEAQz8 24UZ6UPBxO3BgXUtpgUhFUmrVD24iO2Q9la4tDNo3dYcNrKrn4EWaG51OxRO59ZZexbq R0aMKT7MiYF0BsEASTgqLP6C3jr47RgR3AcCpmMPuTxEv3rwam5q9C9WpTooBDLFT0aP 89GZWa+y8CHxyaoxc8R7MkPSFpSK8045Cjh6Wtp1R6hOc3H23sMG/RQcrpbFEZjJki39 Q6f+viO7w6jfAZDGdO9Z36CKbrxlDdJyJDmlvLABYCGsgIJT2sdlNYrAAOByBUEzlZxz wirw== X-Gm-Message-State: AOAM532vNBagzJFnIBCovg+GMZ18YM1Uq7TbkD7i71ftZVWMxOM1JXPj UCl/Uk83P7YDJ4z22eunuPvrKRjad8IjSg== X-Google-Smtp-Source: ABdhPJxoXTKXVS9SxlGRaBfsiG3biTJSIRp/R3opvpfnmxTDqfT1opLgeB+TRUh7vviu1Dt58yQyIA== X-Received: by 2002:a05:6512:104a:b0:44a:5bae:d80d with SMTP id c10-20020a056512104a00b0044a5baed80dmr16625106lfb.390.1648411553698; Sun, 27 Mar 2022 13:05:53 -0700 (PDT) Received: from localhost.localdomain ([212.106.161.171]) by smtp.googlemail.com with ESMTPSA id i3-20020a198c43000000b00448a1566977sm1440445lfj.275.2022.03.27.13.05.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 13:05:53 -0700 (PDT) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 5/7] ath79: bsap18x0: pad rootfs image Date: Sun, 27 Mar 2022 22:05:32 +0200 Message-Id: <20220327200534.377029-6-tmn505@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327200534.377029-1-tmn505@gmail.com> References: <20220327200534.377029-1-tmn505@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_130556_075320_FD4963B8 X-CRM114-Status: GOOD ( 11.50 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This image is supposed to be written with help of bootloader to the flash, but as it stands, it's not aligned to block size and RedBoot will happily create non-aligned partition size in FIS directory. [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:131 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This image is supposed to be written with help of bootloader to the flash, but as it stands, it's not aligned to block size and RedBoot will happily create non-aligned partition size in FIS directory. This could lead to kernel to mark the partition as read-only, therefore pad the image to block erase size boundary. Signed-off-by: Tomasz Maciej Nowak --- target/linux/ath79/image/generic.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 24bd12d652b6..bc078efad53e 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -208,7 +208,7 @@ define Device/adtran_bsap1880 IMAGE_SIZE := 11200k IMAGES += kernel.bin rootfs.bin IMAGE/kernel.bin := append-kernel - IMAGE/rootfs.bin := append-rootfs | pad-rootfs + IMAGE/rootfs.bin := append-rootfs | pad-rootfs | pad-to $$(BLOCKSIZE) IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | \ check-size | sysupgrade-tar rootfs=$$$$@ | append-metadata endef From patchwork Sun Mar 27 20:05:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1609927 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TvAU8qpc; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=epI1Fskq; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KRRqP0Qvbz9sCq for ; Mon, 28 Mar 2022 07:13:53 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Rm3EsFQ00Jtfii0ksMN77N/bAkqYyGVYecgfLFU+CU4=; b=TvAU8qpcDSg0ldM3OqiPneSLtF zuVbh+6aswjuCWK3d8ZwAyfBUcreIWOcHH02EM3L4H+Ep30HbtC2PtUa6fcJPYY5yXcEkO0jbfAZX NzgaX7VdMKHYBopFbFm3r1ngWDS3pWItCEB/wafRZ0TfM4Y0od7BaFIOvn2axO8cXLXP64eRmNwC9 oVG2gz/6hOgZ58JJOg9KCW5CmkPF7OzmWrYKEyUA8Sbnm3tNYwktYh05IfVaOAkATIJa37GS0YdlA KTulbOSxNHkOV4ecwgd6aMFXi11UejguZDcOvyn6ZJOCsRN8zBtvOAUzqz4Wq4Qrq+RFUEKKPna5H DSdyPNOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZEJ-006Coc-72; Sun, 27 Mar 2022 20:11:15 +0000 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ9A-006B6T-4Z for openwrt-devel@lists.openwrt.org; Sun, 27 Mar 2022 20:05:58 +0000 Received: by mail-lf1-x132.google.com with SMTP id e16so21437076lfc.13 for ; Sun, 27 Mar 2022 13:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=qoXrXAtBgaowqM6NixaKodvbYe+QLocvxkSVKHtk1Ac=; b=epI1FskqU3oKkTi/7DZOtu6p7pzjfopZfrJN1fVmwHDoTujJuUXLfy2l45gW3Z7tkP XDm9jG5KABTf2dl1bXdrs8Vytniz/mohNkknyZzb0eVHPFitAC0T2+6hl1ih1Y+mzmbm jAQM2r+Ff4WALJRjqdomazZb97kZ83jmcoXkjYUiwVQMDSkLfb0D4r1jBVgJ9ZZycNlN ntQU7gybB75zSgYiIqjtH6+XFHRXmIaRhj2tTJZ9nPpRGMD0l1o6j0j8/UHOassbKDWV JYVPITH1linSlnfsnp7JhYHq1XjcAV4zCZlEhSGvnEoPNGg9nGv1OXjpZbs1b/eQDVGk LJrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qoXrXAtBgaowqM6NixaKodvbYe+QLocvxkSVKHtk1Ac=; b=zHH9IKxCchczCM5IJG+B4k+rmgCIBA18+5GTmkJxgkQ0PaanYlTKSeikFp9T2KTKhd DzuPoOgWp6EHERyUXFXuNI1+CSeaQl9c96ZFD8su1n463qiCJ7SFG3Qlbjb/6pwhWcWA udQKjBrce3ac1HAreGgHe1YYzLUD4JYRODRydYhNizCA2smuHlscfKR+JLdOWMgiGM48 yT0BJUkEwh2gp7CHjzLay0fZKsJcXtqnRA+h9mtUxsI1jpqQCnscNoR/0dRstvUmkQhw UN7+ostZkJknZRR5vBdSHAway6TTaNmIEChsQnjeWefgUeOL2LTDiLmDb0YpVY3rLnnk Djbg== X-Gm-Message-State: AOAM530aQbQ1Yeu0re/4BIyebvYGfJ2GBecdZ2UXOzkFyBFPrxYITC2y RYy7qhrF3L2G1mTIYGrqvOe6Tk7jDzX3ng== X-Google-Smtp-Source: ABdhPJzsIx+XPeRyU2lCvQuzBmnOn2gasbu39ZJNk9i3lYhNyU/5j/Frukf5JYov/z4T+eW4xsFmBg== X-Received: by 2002:ac2:46e2:0:b0:44a:3e96:3a15 with SMTP id q2-20020ac246e2000000b0044a3e963a15mr16859054lfo.336.1648411554410; Sun, 27 Mar 2022 13:05:54 -0700 (PDT) Received: from localhost.localdomain ([212.106.161.171]) by smtp.googlemail.com with ESMTPSA id i3-20020a198c43000000b00448a1566977sm1440445lfj.275.2022.03.27.13.05.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 13:05:54 -0700 (PDT) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Subject: [PATCH v2 6/7] treewide: use upstream compatible for RedBoot FIS parser Date: Sun, 27 Mar 2022 22:05:33 +0200 Message-Id: <20220327200534.377029-7-tmn505@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327200534.377029-1-tmn505@gmail.com> References: <20220327200534.377029-1-tmn505@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_130556_286345_4A95CBA6 X-CRM114-Status: GOOD ( 16.06 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: No reason to keep that around, since upstream one does the same. Signed-off-by: Tomasz Maciej Nowak --- .../ath79/dts/ar7161_adtran_bsap1880.dtsi | 2 +- .../dts/bcm6348-inventel-livebox-1.dts | 2 +- target/linux/gemini/image/Makefile | 4 ++-- ...t-add-of_match_ta [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:132 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org No reason to keep that around, since upstream one does the same. Signed-off-by: Tomasz Maciej Nowak --- .../ath79/dts/ar7161_adtran_bsap1880.dtsi | 2 +- .../dts/bcm6348-inventel-livebox-1.dts | 2 +- target/linux/gemini/image/Makefile | 4 ++-- ...t-add-of_match_table-with-DT-binding.patch | 22 ------------------- ...t-add-of_match_table-with-DT-binding.patch | 22 ------------------- 5 files changed, 4 insertions(+), 48 deletions(-) delete mode 100644 target/linux/generic/pending-5.10/419-mtd-redboot-add-of_match_table-with-DT-binding.patch delete mode 100644 target/linux/generic/pending-5.15/419-mtd-redboot-add-of_match_table-with-DT-binding.patch diff --git a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi index 5b4b6e3ddafd..d711ca92d3f4 100644 --- a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi +++ b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi @@ -87,7 +87,7 @@ partitions { #address-cells = <1>; #size-cells = <1>; - compatible = "ecoscentric,redboot-fis-partitions"; + compatible = "redboot-fis"; }; }; }; diff --git a/target/linux/bcm63xx/dts/bcm6348-inventel-livebox-1.dts b/target/linux/bcm63xx/dts/bcm6348-inventel-livebox-1.dts index df204cc51ebf..0b541c608111 100644 --- a/target/linux/bcm63xx/dts/bcm6348-inventel-livebox-1.dts +++ b/target/linux/bcm63xx/dts/bcm6348-inventel-livebox-1.dts @@ -75,7 +75,7 @@ status = "okay"; partitions { - compatible = "ecoscentric,redboot-fis-partitions"; + compatible = "redboot-fis"; }; }; diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile index c84f1926dd53..3fce3172ed63 100644 --- a/target/linux/gemini/image/Makefile +++ b/target/linux/gemini/image/Makefile @@ -215,8 +215,8 @@ TARGET_DEVICES += storlink_sl93512r # The wiliboard images need some changes to be functional and buildable. # -# The dts would need to use the ecoscentric,redboot-fis-partitions partition -# parser to get the correct partition offsets and size. +# The dts would need to use the redboot-fis partition parser to get +# the correct partition offsets and size. # # The mkfwimage2 call need to be adjusted to reflect the real size of kernel # and rootfs. It is expected that the OEM firmware adjusts the on flash diff --git a/target/linux/generic/pending-5.10/419-mtd-redboot-add-of_match_table-with-DT-binding.patch b/target/linux/generic/pending-5.10/419-mtd-redboot-add-of_match_table-with-DT-binding.patch deleted file mode 100644 index 7692f484ae0c..000000000000 --- a/target/linux/generic/pending-5.10/419-mtd-redboot-add-of_match_table-with-DT-binding.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Subject: [PATCH] mtd: redboot: add of_match_table with DT binding -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This allows parsing RedBoot compatible partitions for properly described -flash device in DT. - -Signed-off-by: Rafał Miłecki ---- - ---- a/drivers/mtd/parsers/redboot.c -+++ b/drivers/mtd/parsers/redboot.c -@@ -305,6 +305,7 @@ static int parse_redboot_partitions(stru - - static const struct of_device_id mtd_parser_redboot_of_match_table[] = { - { .compatible = "redboot-fis" }, -+ { .compatible = "ecoscentric,redboot-fis-partitions" }, - {}, - }; - MODULE_DEVICE_TABLE(of, mtd_parser_redboot_of_match_table); diff --git a/target/linux/generic/pending-5.15/419-mtd-redboot-add-of_match_table-with-DT-binding.patch b/target/linux/generic/pending-5.15/419-mtd-redboot-add-of_match_table-with-DT-binding.patch deleted file mode 100644 index 3d176f85635d..000000000000 --- a/target/linux/generic/pending-5.15/419-mtd-redboot-add-of_match_table-with-DT-binding.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= -Subject: [PATCH] mtd: redboot: add of_match_table with DT binding -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This allows parsing RedBoot compatible partitions for properly described -flash device in DT. - -Signed-off-by: Rafał Miłecki ---- - ---- a/drivers/mtd/parsers/redboot.c -+++ b/drivers/mtd/parsers/redboot.c -@@ -304,6 +304,7 @@ nogood: - - static const struct of_device_id mtd_parser_redboot_of_match_table[] = { - { .compatible = "redboot-fis" }, -+ { .compatible = "ecoscentric,redboot-fis-partitions" }, - {}, - }; - MODULE_DEVICE_TABLE(of, mtd_parser_redboot_of_match_table); From patchwork Sun Mar 27 20:05:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1609926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=zI9msqil; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=ZybuYhxS; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4KRRnf0HLrz9sCq for ; Mon, 28 Mar 2022 07:12:22 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fogKS532ZxpEKs4KHHt5K2yAoM3yJTDpwfOowy4G9NE=; b=zI9msqilG1OUn9 PBTGMttC1PGuGI7W4Tu3mI76NENZ5iVlGi+WVQ6KC47SMYrb0fWaPXBGbLqikCBD7S4Pcu9ShiqBl horRnZ1vMzOfQ46wm6IgOxVg8DDotPmxm9kzl/VfsXXgvvL2FdhIhPz+QPkETqLyDg2zAAeUSiHBj lwTEHjaXj+hYkl//TjZAEwMF8BLI611EPsvpD+zW/Ngfw2svxBzvB3b5+U2USEzETwoIc+v53iknb dvDGT9xMzxyNeCKivsorByHmKjj9q0INNV0/dnLOGbWgYf8sk0jyWmjNzvQ+adNqHcQ3t4SeyfzAA yj75ZPS3U9XNqe8FKizA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZD2-006CQ9-7b; Sun, 27 Mar 2022 20:09:57 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nYZ9A-006B6j-TM for openwrt-devel@lists.openwrt.org; Sun, 27 Mar 2022 20:05:58 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 17so16652391lji.1 for ; Sun, 27 Mar 2022 13:05:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zDUn9llQJQedW63F5pBdQC3TQfZLcQ9lrbuMNsZTn/E=; b=ZybuYhxSFcmKsGQzFZFOxZF0lRWbPE7I4T05iNQM5qlx0qQQWxbgE2PAQMZd52IW/z G1PXdFDJ0hz536LDVfww1jSxpVl8PZJb8PU+LMavx4hqQD/T+RtKpNotWSlRLbR2HSsj 6QK1BNN7ySa4MxuDqMDliiUl2rxw1bfRNLba9WS9h2urJyCObvDS20BbBjRabwCDpC6X t3ksYWnwtCUEs98lMuPD2pcYnhg4VdN6rEakwQRwxVQnSCqz661zjM51hZQLUxCKtsYt bc9pqbBzeiJyJyrK9nOQ7BJ2EnS4zYu3tAL8kGkS9OKgKhyOnJnwSGsHDNC62DB1OIS0 gvaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zDUn9llQJQedW63F5pBdQC3TQfZLcQ9lrbuMNsZTn/E=; b=iiZSND6xMmK7WXSRK2ER5IJvGkinklFF8dyEZYYvh6PCZfvzGBoma/b6o8+WljzpmM 1T3T1p59pr14kCo1fOPnxVmk6ijpIAMKvREVkKxr8lwrmdSLO6j3ml9y7gU4FtC/7I53 i1F+QmooJmFdGyFg5KICAdT3xB/YgknM9cBdTYUhml96pkOnbgIwXhM5qhDd0gmoJS+y 8czTtPrX85Ew3sLSWaUlabP3ueHdvfsG9Iw5M01qvYr5q3Xlz0BfKiUzSZKaQb+ZK4Nv GF/Rb8DGqMuIDtVaWdjbsWS+Lw7xQ4CI1G4nGXPEq0WI3pTVf/71cf7SAR0VvtiOPkqx LgjA== X-Gm-Message-State: AOAM531DM2VYdnAifccaWpOnvq6gd8FnLgLSQEXmzDLKGzF7hGpsIGkX fnMwgXGY0+axKdkAUNma59BezXz3qhaT2g== X-Google-Smtp-Source: ABdhPJx5fOOVsHp1JKwb9pG0cEebX3gMNt6U/IuSvShEddkK/qU1erJN5ikLeM0zFVE5uZN6Zjy3yA== X-Received: by 2002:a2e:2e0e:0:b0:249:677d:8333 with SMTP id u14-20020a2e2e0e000000b00249677d8333mr17576233lju.37.1648411555120; Sun, 27 Mar 2022 13:05:55 -0700 (PDT) Received: from localhost.localdomain ([212.106.161.171]) by smtp.googlemail.com with ESMTPSA id i3-20020a198c43000000b00448a1566977sm1440445lfj.275.2022.03.27.13.05.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 13:05:54 -0700 (PDT) From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Cc: Brian Gonyer Subject: [PATCH v2 7/7] ath79: bsap18x0: specify FIS directory location in dts Date: Sun, 27 Mar 2022 22:05:34 +0200 Message-Id: <20220327200534.377029-8-tmn505@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220327200534.377029-1-tmn505@gmail.com> References: <20220327200534.377029-1-tmn505@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220327_130557_000971_6B55BB6E X-CRM114-Status: GOOD ( 15.70 ) X-Spam-Score: 0.1 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: The redboot-fis parser has option to specify the location of FIS directory, use that, instead of patching the parser to scan for it, and specifying location in kernel config. Tested-by: Brian Gonyer Signed-off-by: Tomasz Maciej Nowak --- .../ath79/dts/ar7161_adtran_bsap1880.dtsi | 1 + target/linux/ath79/generic/config-default | 1 - .../408-mtd-redboot_partition_scan.pa [...] Content analysis details: (0.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:22f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [tmn505[at]gmail.com] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [tmn505[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The redboot-fis parser has option to specify the location of FIS directory, use that, instead of patching the parser to scan for it, and specifying location in kernel config. Tested-by: Brian Gonyer Signed-off-by: Tomasz Maciej Nowak --- .../ath79/dts/ar7161_adtran_bsap1880.dtsi | 1 + target/linux/ath79/generic/config-default | 1 - .../408-mtd-redboot_partition_scan.patch | 44 ------------------- 3 files changed, 1 insertion(+), 45 deletions(-) delete mode 100644 target/linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch diff --git a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi index d711ca92d3f4..a4cd6b4c8d7d 100644 --- a/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi +++ b/target/linux/ath79/dts/ar7161_adtran_bsap1880.dtsi @@ -88,6 +88,7 @@ #address-cells = <1>; #size-cells = <1>; compatible = "redboot-fis"; + fis-index-block = <0xfd>; }; }; }; diff --git a/target/linux/ath79/generic/config-default b/target/linux/ath79/generic/config-default index 0ac756642fe1..6739aa08d443 100644 --- a/target/linux/ath79/generic/config-default +++ b/target/linux/ath79/generic/config-default @@ -13,7 +13,6 @@ CONFIG_IP17XX_PHY=y CONFIG_LEDS_RESET=y CONFIG_MARVELL_PHY=y CONFIG_MICREL_PHY=y -CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-3 CONFIG_MTD_REDBOOT_PARTS=y CONFIG_MTD_SPLIT_EVA_FW=y CONFIG_PHY_AR7100_USB=y diff --git a/target/linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch b/target/linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch deleted file mode 100644 index e5b06e14a568..000000000000 --- a/target/linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- a/drivers/mtd/parsers/redboot.c -+++ b/drivers/mtd/parsers/redboot.c -@@ -90,12 +90,18 @@ static int parse_redboot_partitions(stru - - parse_redboot_of(master); - -+ buf = vmalloc(master->erasesize); -+ if (!buf) -+ return -ENOMEM; -+ -+ restart: - if ( directory < 0 ) { - offset = master->size + directory * master->erasesize; - while (mtd_block_isbad(master, offset)) { - if (!offset) { - nogood: - printk(KERN_NOTICE "Failed to find a non-bad block to check for RedBoot partition table\n"); -+ vfree(buf); - return -EIO; - } - offset -= master->erasesize; -@@ -108,10 +114,6 @@ static int parse_redboot_partitions(stru - goto nogood; - } - } -- buf = vmalloc(master->erasesize); -- -- if (!buf) -- return -ENOMEM; - - printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n", - master->name, offset); -@@ -184,6 +186,11 @@ static int parse_redboot_partitions(stru - } - if (i == numslots) { - /* Didn't find it */ -+ if (offset + master->erasesize < master->size) { -+ /* not at the end of the flash yet, maybe next block :) */ -+ directory++; -+ goto restart; -+ } - printk(KERN_NOTICE "No RedBoot partition table detected in %s\n", - master->name); - ret = 0;