Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp318487pxx; Mon, 26 Oct 2020 09:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXLUk/iiplvM2Ax1+RBNhNTnbu3fwJqfNztA1sBYzxIi1CCZBx2vZZHWv1WUO8wvFBOMOU X-Received: by 2002:a17:906:398b:: with SMTP id h11mr11523204eje.277.1603728897236; Mon, 26 Oct 2020 09:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603728897; cv=none; d=google.com; s=arc-20160816; b=iU5shg9bkrAXYVq3IbT7jILpEfpegn+4gg8AP1H32cn7CPIQ6bpUZIyYSBgrYB19qT 8Jjn7figOD14mZy0pZ+L1YZe8WHvwN2BDEOPNTJElD+jDcKXuhaDnv0jhXUigWMrdC/s jMUWonqMmU+Q9BXBJTQT2h9K60aRZHANjuGmr/3VDTAbsjiphFThQExPPb2cMkRSALyb 9ygkXZ0UGFoW8Lq18L5pynBgAgZ4iZ7LO5z5S4NOGCP/bePvvpPmj487q0DBOs08t7TC IcufOo2c1VM4dM694LqzDTdT6z0cx0jyUKESgTkFjiXHG5JlOj7GSXNJ861WThbvAjc9 kf4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Pcz4v9qNpJpGQqOygE63AfxlkJy8GhDQp2EqnyOnpYI=; b=z5Xo/MavhDxIVEuh2tzZ8I9kioVBRPqmpfnZRBmkFGFXOieLDybAxKI4olALgE1x6l QLRvTk+hJXXBe3L6Y8knxoJ72Gy85gCDusOraNoosc2Oh6G760XLR6WejoQIUJN1fsL1 rCxN7aP2kSwFg/6GFcDttNYviBoybbHPiRj/KfX6io+JDIwYDvXB4oj78L2OdZHB0Kh5 384fSRhec3Q/GqhRxxYrHmOPSLueM93lQOXhqZfTZ/cPOpHL9d84QIEK+/q7a+XyAJot Lpn0V+qWmzisg++JyMgdCyxaGQLcfD3yQU4GDMl6pRDeqevdac7ouhcfi7lB4y2NAsFz bqlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="vXi/8+ra"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r13si7102017edb.164.2020.10.26.09.14.33; Mon, 26 Oct 2020 09:14:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="vXi/8+ra"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1775135AbgJZMaE (ORCPT + 99 others); Mon, 26 Oct 2020 08:30:04 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:52017 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1769973AbgJZMaE (ORCPT ); Mon, 26 Oct 2020 08:30:04 -0400 Received: by mail-pj1-f68.google.com with SMTP id a17so3173654pju.1; Mon, 26 Oct 2020 05:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Pcz4v9qNpJpGQqOygE63AfxlkJy8GhDQp2EqnyOnpYI=; b=vXi/8+raD5BBJ/yEktEkkIhrN9SsWeDU+1BTPh0lD6PkFV8X4KOB/jq3Ca456Bsjnv pwMRn86jqIq6sCgLI14pMVFkxXWhsHAmGd6dl/5TVuxTxCsMb8thfNp1mDsmWAsWUJdv U0UDg0jZHJyqfZZUSK0sjSlDdZgppJ56s1QV92sGnTGzYpslmZC3Xd2KNMtn9g4IuVB4 oaXjoOzlMwJlo8/P4lHC71SecpH01p9PXx0Bno2qnq5wykEK3vBSKqbiMw++CEwzjVv0 M1Ucd0fCPajxdpT3LTXkljBES3CnbngAYYjuC4h2sNnDAQQWwCL6c83dZ6OvX4Wu1s9f dckg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Pcz4v9qNpJpGQqOygE63AfxlkJy8GhDQp2EqnyOnpYI=; b=rk4fqrxnhaBf3jlbLBiWL+uReMeZWTOLn6V63HBf+cqWOCiX3k0oln3YhUOIBvToWk IJVHvFvgvhJGf0y+GyWWpFF4rg4TU+zDOVHaAPu67z7OTjzpzRxRknzGQy9hRZAzkxtf 7cyEXokmzIC61EH7ArkM7KH3aciY3itLYJn8dgKnpv/Y9SsJLYi/y+u2XySOIrr+IyDE actD+25KcF4moy1YGG7y+Tf8DIdBvw5I5YBhZS0ghg+oVX7EDBOrISJKBFRpxJWfkwsZ F5ZpEOcmfth9dUPJ8rwn21JFwdF/h1wpdmY4C+kWmIziPbvk6nCDp8LRpxxH3/T5dDar 5w0w== X-Gm-Message-State: AOAM530D3mdn7o+xJjuwyBqZ2ujcqVs6KUV5sbHsYGqPzrzkwAiL7k8f oRC8mZ+Zy1JAPmJK1GLMaZ0vDpN3fyM= X-Received: by 2002:a17:90a:7c0c:: with SMTP id v12mr16221998pjf.71.1603715403364; Mon, 26 Oct 2020 05:30:03 -0700 (PDT) Received: from guoguo-omen.lan ([2001:250:3000:3cc2:288c:5ed9:5348:b71b]) by smtp.gmail.com with ESMTPSA id 5sm919201pfn.83.2020.10.26.05.29.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Oct 2020 05:30:02 -0700 (PDT) From: Chuanhong Guo To: linux-mips@vger.kernel.org Cc: Chuanhong Guo , Thomas Bogendoerfer , John Thomson , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] MIPS: zboot: put appended dtb into a section Date: Mon, 26 Oct 2020 20:29:25 +0800 Message-Id: <20201026122926.1774569-1-gch981213@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This will make a separated section for dtb appear in ELF, and we can then use objcopy to patch a dtb into vmlinuz when RAW_APPENDED_DTB is set in kernel config. command to patch a dtb: objcopy --set-section-flags=.appended_dtb=alloc,contents \ --update-section=.appended_dtb=.dtb vmlinuz Signed-off-by: Chuanhong Guo --- Note: This should supersede this patch on linux-mips: [2/2] mips: boot compressed: add support for vlinuz ELF DTB [0] [0] https://patchwork.kernel.org/project/linux-mips/patch/20201015201100.4130-2-git@johnthomson.fastmail.com.au/ arch/mips/boot/compressed/ld.script | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/mips/boot/compressed/ld.script b/arch/mips/boot/compressed/ld.script index 2ed08fbef8e7..0ebb667274d6 100644 --- a/arch/mips/boot/compressed/ld.script +++ b/arch/mips/boot/compressed/ld.script @@ -31,9 +31,12 @@ SECTIONS CONSTRUCTORS . = ALIGN(16); } - __appended_dtb = .; - /* leave space for appended DTB */ - . += 0x100000; + + .appended_dtb : { + __appended_dtb = .; + /* leave space for appended DTB */ + . += 0x100000; + } _edata = .; /* End of data section */ -- 2.26.2