Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp7559505rwi; Mon, 24 Oct 2022 16:47:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM63BMtkFOMLET87rqcUPry0mzoNLz1rXTPZhLJCT/GoDqtnKEt4BZuLi07+eafQ4qz31vQ4 X-Received: by 2002:a65:4bcf:0:b0:460:c57f:9dad with SMTP id p15-20020a654bcf000000b00460c57f9dadmr30417321pgr.18.1666655273396; Mon, 24 Oct 2022 16:47:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666655273; cv=none; d=google.com; s=arc-20160816; b=Bu2S0APD2yNVTGqbtU8y08yZdFCr8mv0tc17yjpcRx741PvCId8Un1mWS/2UBuUVpm mp8PbHT4WURF6kgHwp6ARG0AtN0tpyaTGSdkrFWZjLVcEVwdbdv+XWoq1WpMZs6HZjIg 7nlwbpbXcAgXwQWu5XMDy07ddby27S62mJz7MVS8mzf4t4geK+D2tdDqXYc2EzZs2CVK RYKttw/iUsnn5NtpQx79map1Ycdxoza89jNIYtr82kTabOhr6JRrOaNd63B4ZC+zgIgW QCS3eU2ZCEVY0HDmd+SLvc8c1SmhR+B4lMsHhwZcc6nj8Jm7CsUBkC0OR7dwQ1ieu8+p n1uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=iyIbdz/gaZrm+seGxWNfxkvgBVd5EwDcZBrPGxEZk0c=; b=j6+yRdt39SMGM8mhBgn+W02tu3xytLrXK4uKpAFUVpOpBx0h97o5n5+GUP7kc8mYfZ tPCikqfXy0U33+AKs/gySAz1WdsjqbrmPMfjADJ0gKrbIxrhunDJW5B61CPIAwEEZqMK dywNocLB3AgOQ77uHzPrQPTDmSMT1yRLzM03dkXTZlfFB9pnczQM5jkTOLaXZJVhyWcY K1NYUGKgAE6rWvRaCQsltmgD4EGXnfzYqc59lnTNkAoMhx9bEDDXLUIPz8Dm5+I1hgHg bHK7PCsj0rz6h0PUpgcTOByMJgLfsATLGqrEQ7RpuxORV+Trci6WxPKhhGLuk87rPDLT B2IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fZryfZME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a13-20020a63d20d000000b0043c01032729si975572pgg.666.2022.10.24.16.47.41; Mon, 24 Oct 2022 16:47:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fZryfZME; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230269AbiJXXnn (ORCPT + 99 others); Mon, 24 Oct 2022 19:43:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230207AbiJXXnI (ORCPT ); Mon, 24 Oct 2022 19:43:08 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D6CC8287A; Mon, 24 Oct 2022 15:01:49 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id r142so8866459iod.11; Mon, 24 Oct 2022 15:01:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=iyIbdz/gaZrm+seGxWNfxkvgBVd5EwDcZBrPGxEZk0c=; b=fZryfZMEuHbvYz4STXBnSHbm//E5vQKBReeGURV369WyiHDicOMaYtaHcZWZU5uc+a 9O1A3sTGiAn+hCn5MxlDcYpG0HbYDR0au5+j/IIF7DH8kF0aJqcE76V/i0x5cAvht9tU 33u8D77Ty5TVaWQjC01L1zFqcfqDJryGOYFwlg0Dur9XwJXF8cxzFB6XcqLgDDGBsSD7 hxMPyzH2tE0Hzm5X9hYFnM2TmOM5jRLzO748ug48MNk0TOfFyBfEUxlTb9VLMP8GhnJ+ VJDK3KUHxzjCypDLHHFzMz1fLnNOneKnsQUAzJTEuGIIXHQWwVAuxb5w2LWhYcpH5Df+ ppAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iyIbdz/gaZrm+seGxWNfxkvgBVd5EwDcZBrPGxEZk0c=; b=ojQ4fJJ7T+kjIUAcdlHYzakU3BAQVZe/XH8Bx7G6RQgyVqet8R5poSAfB34RPhtKKq 46CyxUR2clreF1sKybpVM/bjpM98BM0ebK83hTcL9oWzC7lcRxgRzXCZxSpXyQ41Lh3o hdW+3TDXdhbt5Ku42C2NS/jprghZTx2tHJ2RNy4E0dI0f2qjKXm1nYWb4QC2AkQcicxi 8jemCkJRWYGMBB0FNSZfqmBoWTX+gVpOVZM7CtDPVZW4Vmx0pWaw7XB/BMOi6BRkdEWM 0+Mlpv5gwJZBCbE5U6rDKswSrotmPxLvbT4ogm1oqIIE4lxieqqKwV2TlXdnKg9oFezq vvqQ== X-Gm-Message-State: ACrzQf1JcBqb3xq6+JzWgPIrxSI6+VIeKmUi1TPJgy1peEA9+MfLpfBw PqYLpVr3hgN6SSw7OpkP5yg= X-Received: by 2002:a02:85ae:0:b0:363:84f7:566d with SMTP id d43-20020a0285ae000000b0036384f7566dmr23267382jai.125.1666648903952; Mon, 24 Oct 2022 15:01:43 -0700 (PDT) Received: from ?IPV6:2600:1700:2442:6db0:b8cc:2162:7a0f:fd4b? ([2600:1700:2442:6db0:b8cc:2162:7a0f:fd4b]) by smtp.gmail.com with ESMTPSA id y8-20020a056638038800b00363c1d1ac05sm250787jap.27.2022.10.24.15.01.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 15:01:43 -0700 (PDT) Message-ID: Date: Mon, 24 Oct 2022 17:01:41 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH v2 2/7] kbuild: Allow DTB overlays to built into .dtso.S files Content-Language: en-US To: Andrew Davis , Shawn Guo , Li Yang , Sascha Hauer , Rob Herring , Krzysztof Kozlowski , Nishanth Menon , Vignesh Raghavendra , Masahiro Yamada , Michal Marek , Nick Desaulniers , Geert Uytterhoeven Cc: devicetree@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20221024173434.32518-1-afd@ti.com> <20221024173434.32518-3-afd@ti.com> From: Frank Rowand In-Reply-To: <20221024173434.32518-3-afd@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/22 12:34, Andrew Davis wrote: > DTB files can be built into the kernel by converting them to assembly > files then assembling them into object files. We extend this here > for DTB overlays with the .dtso extensions. > > We change the start and end delimiting tag prefix to make it clear that > this data came from overlay files. > > [Based on patch by Frank Rowand ] > Signed-off-by: Andrew Davis > Reviewed-by: Geert Uytterhoeven > Tested-by: Geert Uytterhoeven > --- Reviewed-by: Frank Rowand Tested-by: Frank Rowand -Frank > scripts/Makefile.lib | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib > index 0376a6f18bfb1..250b9fd73f6d2 100644 > --- a/scripts/Makefile.lib > +++ b/scripts/Makefile.lib > @@ -358,7 +358,7 @@ DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) > DTC_FLAGS += $(if $(filter $(patsubst $(obj)/%,%,$@), $(base-dtb-y)), -@) > > # Generate an assembly file to wrap the output of the device tree compiler > -quiet_cmd_dt_S_dtb= DTB $@ > +quiet_cmd_dt_S_dtb= DTBS $@ > cmd_dt_S_dtb= \ > { \ > echo '\#include '; \ > @@ -375,6 +375,24 @@ cmd_dt_S_dtb= \ > $(obj)/%.dtb.S: $(obj)/%.dtb FORCE > $(call if_changed,dt_S_dtb) > > +# Generate an assembly file to wrap the output of the device tree compiler > +quiet_cmd_dt_S_dtbo= DTBOS $@ > +cmd_dt_S_dtbo= \ > +{ \ > + echo '\#include '; \ > + echo '.section .dtb.init.rodata,"a"'; \ > + echo '.balign STRUCT_ALIGNMENT'; \ > + echo '.global __dtbo_$(subst -,_,$(*F))_begin'; \ > + echo '__dtbo_$(subst -,_,$(*F))_begin:'; \ > + echo '.incbin "$<" '; \ > + echo '__dtbo_$(subst -,_,$(*F))_end:'; \ > + echo '.global __dtbo_$(subst -,_,$(*F))_end'; \ > + echo '.balign STRUCT_ALIGNMENT'; \ > +} > $@ > + > +$(obj)/%.dtbo.S: $(obj)/%.dtbo FORCE > + $(call if_changed,dt_S_dtbo) > + > quiet_cmd_dtc = DTC $@ > cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ > $(DTC) -o $@ -b 0 \