Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1022676pxf; Thu, 11 Mar 2021 23:13:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKi0Z1h05gIeG1j8SzDIRethVJ21tuhOquq3v1zLqCefK76EBLXuHq6EqTKirKpvISYmEO X-Received: by 2002:aa7:ca04:: with SMTP id y4mr12393521eds.339.1615533225625; Thu, 11 Mar 2021 23:13:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615533225; cv=none; d=google.com; s=arc-20160816; b=MLQMvPzxvfVydMNjaQn2y8kgt9FrlHkihRqyHLsr1Css81xEmiWZdncOELJbUVVpbm c9v9dS3CGItr48jjORgHFT83lYtIhf22apMgKwD2u1ic95u13gcgDFHGMw7pw9EuB0CZ Kvs/Womom1yZ8Sb5gu2GnPx80JGfzKBxAAweF0CIx0pGdoES+iFyCgCJd/2FlOnwSgrr ZLIIOzmwZ4C4cMugklrg41FT8ISnAooe7U/J5WrTR5I2ZkpTox8wA05wQYU35TTD/LvE FeHppcHYKOL2xyeLp4yyyCtt5jsV5D6XNWP/YpN2dOjsTcvYkVkW2CyGV+cjHHFodfQB hCzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject:dkim-signature; bh=6HyVPzfJtnZPj+FiCGLisT9CcoQVNfECVYHQyi8QH9g=; b=VvwUtvHqG2eaaLQRfTXZdPNeakZBv42Rdohdx+KNU2lCNhoO2vOjX9S8+Dia3pxmrf ouaXQuxpwHvr9LUAYm+LYdPuQiIt8O1BVc0xlCCZfUyTj9cvtVVON/IyHJnoFPzj4oA5 dZAt9WPLOOH8Jt8g+7zd5vUVq3kFxesBL7/TCcW/nM6DoCeLdvk2rSYf3fsQmomegto9 qrr5h6LYoRCyNwmG7uiyj1dF6neKEPdzMVgCcoZ4FwNpVyPVE1Z3Oviw6TaB0Y1DHhcP 26YqJtrNu/PZzBCHfEbH3P2XXn+ezDMS4bSrZiIaLg+nEf+oalDpGIJgZ6QA3jFm/R6V aBvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d+AAS2QH; 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 bg8si3465132ejb.188.2021.03.11.23.13.23; Thu, 11 Mar 2021 23:13:45 -0800 (PST) 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=d+AAS2QH; 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 S230133AbhCLHJl (ORCPT + 99 others); Fri, 12 Mar 2021 02:09:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230463AbhCLHJ1 (ORCPT ); Fri, 12 Mar 2021 02:09:27 -0500 Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C578C061574; Thu, 11 Mar 2021 23:09:27 -0800 (PST) Received: by mail-qk1-x732.google.com with SMTP id l132so23358396qke.7; Thu, 11 Mar 2021 23:09:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6HyVPzfJtnZPj+FiCGLisT9CcoQVNfECVYHQyi8QH9g=; b=d+AAS2QHDbfT8/U25ISrEO1ETDoQ/gW380T4r08dP44MRmjIrcjn+eAuz6/+QRFyXN TxsXr4x0oKN5nFPTWwdOHLOp5JIZd3lgAKMo1HYjWpXSYml1uFciD+o+eoUpzLpC0PrQ EAMDTU7vB0gSJzclhKz3DabHpVVucGMGS9hTOpa2szZk/zjaV/M0kZUCeJlEqrnhs3xX ofUdzHGWzjx4rEVCYFzDTfE0fQmGfzdXVy6YtawY7FCuqbj/u0iNob1Ol0P68/moYUF5 8pL/s9qE7sKD8OtRPh78lFUva641ypivI/7092GBfjgxSZ5On1/tNwYSUrE/gLMAGRct u9bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6HyVPzfJtnZPj+FiCGLisT9CcoQVNfECVYHQyi8QH9g=; b=jOpsOumGqbdhKHNtLb7SPVgyDy22SDJCp9zFjhJmA3u4310ZssWEx39cii+D/uBygp qtMKZE0RmpNGY6W4T9uBtHN3Hyd/DO8YzgHGjAeCLxPQML4AiS/pAdcjYowQdhfRGGWC h9wTIWucCvfnEAsrb/YdXx1Ec3lwjUGGugWZFFP04ZzcnCR9cbJyZQ87GB7RlTALSp8i pIXrka9wZxfNH4lUVD3Vmk8DBSFyF5NV5cGXAGnqVgNY13OHOXTLEGfx4SPV0L2DEuvv fDvQASRTz6Zn2Sh5PkxQaxxqYZeHaro2zrUFjIHaihyztXpv3rGjaQk+7YS0lG/P/0Hc W6Iw== X-Gm-Message-State: AOAM531YY7kWtWKdGLt2olmbJycJ0Kl2gtidsoCG5hBIN/YgZHKik9m6 WkXaix9EHKHsiOUlz+o2qQc= X-Received: by 2002:a05:620a:a8b:: with SMTP id v11mr10875808qkg.414.1615532966870; Thu, 11 Mar 2021 23:09:26 -0800 (PST) Received: from [192.168.1.49] (c-67-187-90-124.hsd1.ky.comcast.net. [67.187.90.124]) by smtp.gmail.com with ESMTPSA id j2sm3613722qkk.96.2021.03.11.23.09.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Mar 2021 23:09:26 -0800 (PST) Subject: Re: [PATCH V11 3/5] kbuild: Allow .dtso format for overlay source files From: Frank Rowand To: Viresh Kumar , Masahiro Yamada Cc: Michal Marek , Vincent Guittot , David Gibson , Michal Simek , Geert Uytterhoeven , Anmar Oueja , Bill Mills , Geert Uytterhoeven , Linux Kbuild mailing list , Linux Kernel Mailing List References: <170e086a5fa076869e7b37de8eea850fa7c39118.1615354376.git.viresh.kumar@linaro.org> <20210312044712.srmqfuie7fae55pb@vireshk-i7> <17c65559-865f-f742-660f-0ab30ed45d90@gmail.com> Message-ID: <4d9bee7a-416e-50a1-65a5-0674ae83d42e@gmail.com> Date: Fri, 12 Mar 2021 01:09:25 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <17c65559-865f-f742-660f-0ab30ed45d90@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/12/21 1:03 AM, Frank Rowand wrote: > Hi Viresh, > > On 3/11/21 10:47 PM, Viresh Kumar wrote: >> On 10-03-21, 20:24, Masahiro Yamada wrote: >>> Even without "-I dts", >>> >>> inform = guess_input_format(arg, "dts"); >>> >>> seems to fall back to "dts" anyway, >>> but I guess you wanted to make this explicit, correct? >> >> >>>> +# Required for of unit-test files as they can't be renamed to .dtso >>> >>> If you go with *.dtso, I think you will rename >>> all *.dts under the drivers/ directory. >>> >>> What is blocking you from making this consistent? >> >> What about this patch instead ? This localizes the dts->dtbo hack to >> unitest's Makefile at least. > > It is late here, so I am not going to take the time to actually try what > I am going to suggest. I apologize in advance if I send you off on a > wild goose chase. > > Would it work to create a .dtso file for each of the unittest overlay .dts > files, where the .dtso would simply #include the .dts file. Then the corresponding > .dtbo files could be added to the obj-$(CONFIG_OF_OVERLAY) list. I suggested having the .dtso files include the .dts file because that is a relatively small and easy change to test. What would probably make more sense is the rename the existing overlay .dts files to be .dtso files and then for each overlay .dtso file create a new .dts file that #includes the corresponding .dtso file. This is more work and churn, but easier to document that the .dts files are a hack that is needed so that the corresponding .dtb.S files will be generated. If it works, I am fine with either approach. -Frank > > I would like to avoid having the unitest-data/Makefile have different rules to > build objects because then the normal build rule is not being tested. > > -Frank > >> >> diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile >> index a5d2d9254b2c..9f3426ec3fab 100644 >> --- a/drivers/of/unittest-data/Makefile >> +++ b/drivers/of/unittest-data/Makefile >> @@ -86,3 +86,7 @@ static_test_1-dtbs := static_base_1.dtb $(apply_static_overlay_1) >> static_test_2-dtbs := static_base_2.dtb $(apply_static_overlay_2) >> >> dtb-$(CONFIG_OF_OVERLAY) += static_test_1.dtb static_test_2.dtb >> + >> +# Required for of unittest files as they can't be renamed to .dtso >> +$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE >> + $(call if_changed_dep,dtc) >> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib >> index bc045a54a34e..77a9be055e51 100644 >> --- a/scripts/Makefile.lib >> +++ b/scripts/Makefile.lib >> @@ -347,7 +347,7 @@ cmd_dtc = $(HOSTCC) -E $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; >> $(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE >> $(call if_changed_dep,dtc) >> >> -$(obj)/%.dtbo: $(src)/%.dts $(DTC) FORCE >> +$(obj)/%.dtbo: $(src)/%.dtso $(DTC) FORCE >> $(call if_changed_dep,dtc) >> >> overlay-y := $(addprefix $(obj)/, $(overlay-y)) >> @@ -375,6 +375,9 @@ endef >> $(obj)/%.dt.yaml: $(src)/%.dts $(DTC) $(DT_TMP_SCHEMA) FORCE >> $(call if_changed_rule,dtc,yaml) >> >> +$(obj)/%.dt.yaml: $(src)/%.dtso $(DTC) $(DT_TMP_SCHEMA) FORCE >> + $(call if_changed_rule,dtc,yaml) >> + >> dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) >> >> # Bzip2 >> >