From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B92BC433EF for ; Mon, 25 Oct 2021 19:09:53 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4F43960F70 for ; Mon, 25 Oct 2021 19:09:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4F43960F70 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 089A983538; Mon, 25 Oct 2021 21:09:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 8132B8353B; Mon, 25 Oct 2021 21:09:47 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CA5A983536 for ; Mon, 25 Oct 2021 21:09:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=andy.shevchenko@gmail.com X-IronPort-AV: E=McAfee;i="6200,9189,10148"; a="315939410" X-IronPort-AV: E=Sophos;i="5.87,181,1631602800"; d="scan'208";a="315939410" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2021 11:53:08 -0700 X-IronPort-AV: E=Sophos;i="5.87,181,1631602800"; d="scan'208";a="596602776" Received: from smile.fi.intel.com ([10.237.72.184]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Oct 2021 11:53:06 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1mf55R-000wPK-Vg; Mon, 25 Oct 2021 21:52:45 +0300 Date: Mon, 25 Oct 2021 21:52:45 +0300 From: Andy Shevchenko To: Simon Glass Cc: U-Boot Mailing List , Bin Meng , Tom Rini , Wolfgang Wallner Subject: Re: [PATCH v1 1/1] Makefile.lib: Always rebuild DSDT Message-ID: References: <20211020123742.31098-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Mon, Oct 25, 2021 at 09:18:56AM -0600, Simon Glass wrote: > On Mon, 25 Oct 2021 at 01:34, Andy Shevchenko wrote: > > On Sun, Oct 24, 2021 at 11:00 PM Simon Glass wrote: > > > On Wed, 20 Oct 2021 at 06:37, Andy Shevchenko > > > wrote: > > > > > > > > The dsdt.asl is usually combined out of several files that are included > > > > in the main one. Whenever we change the content of any of such files, > > > > build system is not able to recognize them. Hence the easiest way is to > > > > force DSDT rebuild each time we run make. > > > > > Ick. Since it uses #include, doesn't the dependency generation work with this? > > > > How? > > If you do a sandbox build you will see this file: > > arch/sandbox/dts/.sandbox.dtb.cmd > > It contains the dependencies used to compile the device tree. Can we > use the same mechanism? There is a .cmd file for the dsdt file but it > does not seem to have the correct contents. A spent more than couple of hours to fight with `make` and failed. Maybe you can improve the below (it still rebuilds always) >From 2fa93fdc376b60c69ff1a2e9ffd16d30702c6399 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Wed, 20 Oct 2021 15:21:49 +0300 Subject: [PATCH 1/1] Makefile.lib: Always rebuild DSDT The dsdt.asl is usually combined out of several files that are included in the main one. Whenever we change the content of any of such files, build system is not able to recognize them. Hence the easiest way is to force DSDT rebuild each time we run make. Signed-off-by: Andy Shevchenko --- scripts/Makefile.lib | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index ac270844c2e1..939f99dee9f9 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -432,16 +432,21 @@ CFLAGS_REMOVE_efi_freestanding.o := $(LTO_CFLAGS) # renamed to dsdt.c for consumption by the build system. ASL_TMP = $(patsubst %.c,%.asl.tmp,$@) +asl_cpp_flags = -Wp,-MD,$(depfile) -nostdinc \ + $(UBOOTINCLUDE) \ + -I$(srctree)/include \ + -D__ASSEMBLY__ \ + -undef -D__ACPI__ + quiet_cmd_acpi_c_asl= ASL $< cmd_acpi_c_asl= \ - $(CPP) -x assembler-with-cpp -D__ASSEMBLY__ -D__ACPI__ \ - -P $(UBOOTINCLUDE) -o $(ASL_TMP) $< && \ + $(HOSTCC) -P -E $(asl_cpp_flags) -x assembler-with-cpp -o $(ASL_TMP) $< && \ iasl -p $@ -tc $(ASL_TMP) $(if $(KBUILD_VERBOSE:1=), >/dev/null) && \ - mv $(patsubst %.c,%.hex,$@) $@ + mv $(patsubst %.c,%.hex,$@) $@ && \ + sed -i -e "s,dsdt_aml_code,AmlCode," $@ -$(obj)/dsdt.c: $(src)/dsdt.asl - $(call cmd,acpi_c_asl) - $(Q)sed -i -e "s,dsdt_aml_code,AmlCode," $@ +$(obj)/dsdt.c: $(src)/dsdt.asl FORCE + $(call if_changed_dep,acpi_c_asl) # Bzip2 # --------------------------------------------------------------------------- -- With Best Regards, Andy Shevchenko