From patchwork Sat Nov 19 10:01:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thibaut X-Patchwork-Id: 1706536 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: legolas.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=mpCq1D7g; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=slashdirt.org header.i=@slashdirt.org header.a=rsa-sha256 header.s=mail header.b=NMiJi8Y9; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NDq73551Dz23lt for ; Sat, 19 Nov 2022 21:06:20 +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: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:In-Reply-To:References: List-Owner; bh=a6ZV/hsvwoJygKZzeE8hCuob9fERUSgk9QuGYp7cR/k=; b=mpCq1D7gn0mLcs m1ANmNnKUMUIeJRNpvxAOL1wdnp7Q8FxVEwDprMWttezXotFApvVmYm/We19lvHD9ZwvPKclfmJ7s ezcVhHRLFn4gS3UyKBaUe9rs2cEoYrsvHMwBslwi5UkqY3OgITH51zDnQmcNirm6f6dMf0763AFRs jq6zuiO4eHaEN7uClAST24lIculXu2t+QQcIIBbku+qOvQgrnNJQP/MnJy9bh0dXv87fF8kbW4G+s ezTI6PKK8EN7goXzNoTeMHvtiFnlhGLwlmht9LNEIpZkhAN+OpOpyl1ckU0hsMR1fR2U4NWvArs5s zkrnN0YT+8Ge+1BglSAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1owKfe-00Cu5s-RY; Sat, 19 Nov 2022 10:01:58 +0000 Received: from vps.slashdirt.org ([144.91.108.218]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1owKfa-00Cu4H-VD for openwrt-devel@lists.openwrt.org; Sat, 19 Nov 2022 10:01:56 +0000 Received: from Chuck.tardis.lan (tardis.herebedragons.eu [171.22.3.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by vps.slashdirt.org (Postfix) with ESMTPSA id 851A760187; Sat, 19 Nov 2022 11:01:40 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 vps.slashdirt.org 851A760187 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=slashdirt.org; s=mail; t=1668852102; bh=25CV0LMPvHWbtHHyB4DHi2l9E9buz/G1jXqBz8EhOdI=; h=From:To:Cc:Subject:Date:From; b=NMiJi8Y9AAIQNR1JeRjNSsmdHzFMf8noRKpP4UC5jmYXZlRVd2QvSSxRx5TqMQXZ7 fonmwFWxa3ncyO5cyVB7hXHT/lIvssqTa50voidjFW8Mb7+gVKpXBPwNi/5MPUaD75 S+6R3eJqipZyJQNf/gdzp9dPUosQJ4Z6o3KkA5ZM= From: =?utf-8?q?Thibaut_VAR=C3=88NE?= To: openwrt-devel@lists.openwrt.org Cc: hauke@hauke-m.de, John Thomson , =?utf-8?q?Thibaut_VAR=C3=88NE?= Subject: [PATCH 22.03] ath79: mikrotik: use OpenWrt loader for initram image Date: Sat, 19 Nov 2022 11:01:17 +0100 Message-Id: <20221119100117.10256-1-hacks@slashdirt.org> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221119_020155_504566_AF921BE7 X-CRM114-Status: GOOD ( 12.21 ) X-Spam-Score: 0.2 (/) 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: From: John Thomson Return to using the OpenWrt kernel loader to decompress and load kernel initram image. Continue to use the vmlinuz kernel for squashfs. Content analysis details: (0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.4 NO_DNS_FOR_FROM RBL: Envelope sender has no MX or A DNS records [listed in slashdirt.org. IN A] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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 From: John Thomson Return to using the OpenWrt kernel loader to decompress and load kernel initram image. Continue to use the vmlinuz kernel for squashfs. Mikrotik's bootloader RouterBOOT on some ath79 devices is failing to boot the current initram, due to the size of the initram image. On the ath79 wAP-ac: a 5.7MiB initram image would fail to boot After this change: a 6.6MiB initram image successfully loads This partially reverts commit e91344776b9ba7c864be88d915c9c0df0eb790dd. An alternative of using RouterBOOT's capability of loading an initrd ELF section was investigated, but the OpenWrt kernel loader allows larger image. Signed-off-by: John Thomson (cherry picked from commit 62b72eafe49d2eecd3692691152ed86a0327fcb0) Signed-off-by: Thibaut VARĂˆNE Fixes: #9954 --- This should be backported as it fixes non-bootable install media for 22.03 It has seen a couple months of use in master with no report of issues. --- target/linux/ath79/image/common-mikrotik.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/linux/ath79/image/common-mikrotik.mk b/target/linux/ath79/image/common-mikrotik.mk index 5f5fa7899a..fb3dc78226 100644 --- a/target/linux/ath79/image/common-mikrotik.mk +++ b/target/linux/ath79/image/common-mikrotik.mk @@ -1,8 +1,10 @@ define Device/mikrotik DEVICE_VENDOR := MikroTik + LOADER_TYPE := elf KERNEL_NAME := vmlinuz KERNEL := kernel-bin | append-dtb-elf - KERNEL_INITRAMFS := kernel-bin | append-dtb-elf + KERNEL_INITRAMFS_NAME := vmlinux-initramfs + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel endef define Device/mikrotik_nor