From patchwork Fri Jun 19 09:32:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Petr_=C5=A0tetiar?= X-Patchwork-Id: 1312736 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=none (p=none dis=none) header.from=true.cz 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=BKrlsjw5; 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 49pDCl00NPz9sRk for ; Fri, 19 Jun 2020 19:34:26 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date: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=gpyOgc+UGA0+9/h0GVDOUpPEqU5UmoMufFNE6iiPSHo=; b=BKrlsjw5XuomV8 9GlYURch8uq1zCsGZ3k9B3XdqfsUDkMYOBJ6ahRrLtfJWlPjEKK9rzQH5XRsUKq40bkm6NhgBNest 1jg5Hi/GqOOl6lLxdFbzIh1xbBxRH7og6lY7v4RJnpQuGIECRPyBbAGNZpKX6ziRa2NbsiajZBWo8 L2TF5+guq9mB/iWHi6i7umOZsJteQe2RIUSlrA6XsKbtLpMHp60n2FjpmxBY3ClRxIpXqmwNFxDuP LRij9cU8P3j+FiMHFAIEvPapaAKg6KDU4mogxVSWI4kBld8EM2U3ouCazUY1iiNSHLSRsx+cstcJZ fPvtrzk/RWQJIwp5eZ1g==; 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 1jmDPj-000659-QQ; Fri, 19 Jun 2020 09:34:23 +0000 Received: from smtp-out.xnet.cz ([178.217.244.18]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmDNx-0004KR-5Z for openwrt-devel@lists.openwrt.org; Fri, 19 Jun 2020 09:32:36 +0000 Received: from meh.true.cz (meh.true.cz [108.61.167.218]) (Authenticated sender: petr@true.cz) by smtp-out.xnet.cz (Postfix) with ESMTPSA id B90E51880B; Fri, 19 Jun 2020 11:32:24 +0200 (CEST) Received: by meh.true.cz (OpenSMTPD) with ESMTP id 40aac605; Fri, 19 Jun 2020 11:32:07 +0200 (CEST) From: =?utf-8?q?Petr_=C5=A0tetiar?= To: openwrt-devel@lists.openwrt.org Date: Fri, 19 Jun 2020 11:32:15 +0200 Message-Id: <20200619093215.28273-1-ynezz@true.cz> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200619_023233_373907_FC32B711 X-CRM114-Status: UNSURE ( 6.58 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record Subject: [OpenWrt-Devel] [PATCH] ath79: image: fix initramfs for safeloader devices 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: =?utf-8?q?Petr_=C5=A0tetiar?= Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Currently it's not possible to tftpboot initramfs image on archer-c7-v5 as the image contains tplink-v1-header which leads to: ath> bootm ## Booting image at 81000000 ... Bad Magic Number as U-Boot expect uImage wrapped image. This is caused by following inheritance issue: define Device/Init KERNEL_INITRAMFS = $$(KERNEL) define Device/tplink-v1 KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v1-header define Device/tplink-safeloader $(Device/tplink-v1) define Device/tplink-safeloader-uimage $(Device/tplink-safeloader) KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma define Device/tplink_archer-c7-v5 $(Device/tplink-safeloader-uimage) where tplink-v1 defines KERNEL_INITRAMFS with tplink-v1-header and it's then used by all devices inheriting from tplink-safeloader. Fix this by overriding KERNEL_INITRAMFS to KERNEL variable again. Signed-off-by: Petr Štetiar --- target/linux/ath79/image/common-tp-link.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk index 328eaaed3056..81a557df4871 100644 --- a/target/linux/ath79/image/common-tp-link.mk +++ b/target/linux/ath79/image/common-tp-link.mk @@ -78,6 +78,7 @@ define Device/tplink-safeloader $(Device/tplink-v1) TPLINK_HWREV := 0x0 KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O + KERNEL_INITRAMFS := $$(KERNEL) IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \ append-metadata | check-size IMAGE/factory.bin := append-rootfs | tplink-safeloader factory @@ -86,6 +87,7 @@ endef define Device/tplink-safeloader-uimage $(Device/tplink-safeloader) KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma + KERNEL_INITRAMFS := $$(KERNEL) endef define Device/tplink-safeloader-okli @@ -96,4 +98,5 @@ define Device/tplink-safeloader-okli COMPILE/loader-$(1).elf := loader-okli-compile KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | \ loader-okli $(1) 12288 + KERNEL_INITRAMFS := $$(KERNEL) endef