mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Tomaž Šolc" <tomaz.solc@klevio.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] genenv: create a gcc-like .d file for depenencies.
Date: Wed, 20 Feb 2019 12:14:43 +0100	[thread overview]
Message-ID: <67fcde46-447e-8c16-3a1e-d7106700904b@klevio.com> (raw)
In-Reply-To: <20190220085741.lbv5zsyv3ur5grl6@pengutronix.de>

Hi Sascha,

On 20. 02. 19 09:57, Sascha Hauer wrote:
> Hi Tomaz,
> 
> On Mon, Feb 18, 2019 at 04:57:12PM +0100, Tomaz Solc wrote:
>> With this commit genenv creates a .d file, similar to those created by gcc to
>> track C header dependencies. This is then passed to Kbuild with if_changed_dep
>> in the Makefile. This makes make re-run genenv if any source environment files are
>> changed. However, new environment files are still not detected automatically.
> 
> Please try the attached patch. It should solve this issue once and for
> all. With this the environments are always built, but only if they have
> actually changed then the corresponding .S files are built.

Unfortunately with your patch the final image still gets rebuilt with a 
stale environment unless I delete defaultenv/barebox_default_env.

See transcript bellow, where I'm using your patch. I modify one 
environment file for Raspberry Pi. After just calling "make", the image 
doesn't include the change.

Best regards
Tomaž

$ make rpi_defconfig
$ make
[...]
$ strings images/barebox-raspberry-pi-3.img | grep global.test
$ echo global.test="foo" >> 
arch/arm/boards/raspberry-pi/env/init/bootargs-base
$ make
make[1]: 'include/generated/mach-types.h' is up to date.
   CHK     include/generated/version.h
   CHK     include/generated/utsrelease.h
   UPD     include/generated/utsrelease.h
   CREATE  include/config.h
   CHK     include/generated/compile.h
   CC      common/version.o
   CC      common/globalvar.o
   CHK     include/generated/passwd.h
   LD      common/built-in.o
   ENV     defaultenv/defaultenv-2-base.bbenv
   GEN     .version
   CHK     include/generated/compile.h
   UPD     include/generated/compile.h
   CC      common/version.o
   CHK     include/generated/passwd.h
   LD      common/built-in.o
   LD      .tmp_barebox1
   KSYM    .tmp_kallsyms1.S
   AS      .tmp_kallsyms1.o
   LD      .tmp_barebox2
   KSYM    .tmp_kallsyms2.S
   AS      .tmp_kallsyms2.o
   LD      barebox
   SYSMAP  System.map
   OBJCOPY barebox.bin
   SHIPPED_S images/barebox.z
   AS      images/piggy.o
   LD      images/start_raspberry_pi1.pbl
   OBJCOPYB images/start_raspberry_pi1.pblb
   SHIPPED images/barebox-raspberry-pi-1.img
   LD      images/start_raspberry_pi2.pbl
   OBJCOPYB images/start_raspberry_pi2.pblb
   SHIPPED images/barebox-raspberry-pi-2.img
   LD      images/start_raspberry_pi3.pbl
   OBJCOPYB images/start_raspberry_pi3.pblb
   SHIPPED images/barebox-raspberry-pi-3.img
   LN      images/../barebox-flash-image
images built:
barebox-raspberry-pi-1.img
barebox-raspberry-pi-2.img
barebox-raspberry-pi-3.img
$ strings images/barebox-raspberry-pi-3.img | grep global.test
$ rm defaultenv/barebox_default_env
$ make
make[1]: 'include/generated/mach-types.h' is up to date.
   CHK     include/generated/version.h
   CHK     include/generated/utsrelease.h
   CREATE  include/config.h
   CHK     include/generated/compile.h
   CHK     include/generated/passwd.h
   ENV     defaultenv/barebox_default_env
   ENVH    defaultenv/barebox_default_env.h
   CC      defaultenv/defaultenv.o
   ENV     defaultenv/defaultenv-2-base.bbenv
   LD      defaultenv/built-in.o
   GEN     .version
   CHK     include/generated/compile.h
   UPD     include/generated/compile.h
   CC      common/version.o
   CHK     include/generated/passwd.h
   LD      common/built-in.o
   LD      .tmp_barebox1
   KSYM    .tmp_kallsyms1.S
   AS      .tmp_kallsyms1.o
   LD      .tmp_barebox2
   KSYM    .tmp_kallsyms2.S
   AS      .tmp_kallsyms2.o
   LD      barebox
   SYSMAP  System.map
   OBJCOPY barebox.bin
   SHIPPED_S images/barebox.z
   AS      images/piggy.o
   LD      images/start_raspberry_pi1.pbl
   OBJCOPYB images/start_raspberry_pi1.pblb
   SHIPPED images/barebox-raspberry-pi-1.img
   LD      images/start_raspberry_pi2.pbl
   OBJCOPYB images/start_raspberry_pi2.pblb
   SHIPPED images/barebox-raspberry-pi-2.img
   LD      images/start_raspberry_pi3.pbl
   OBJCOPYB images/start_raspberry_pi3.pblb
   SHIPPED images/barebox-raspberry-pi-3.img
   LN      images/../barebox-flash-image
images built:
barebox-raspberry-pi-1.img
barebox-raspberry-pi-2.img
barebox-raspberry-pi-3.img
$ strings images/barebox-raspberry-pi-3.img | grep global.test
global.test=foo
$

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-02-20 11:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-18 15:57 Tomaz Solc
2019-02-20  8:57 ` Sascha Hauer
2019-02-20 11:14   ` Tomaž Šolc [this message]
2019-02-20 11:28     ` Sascha Hauer
2019-02-21  8:34       ` Tomaž Šolc
2019-02-22  7:34         ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=67fcde46-447e-8c16-3a1e-d7106700904b@klevio.com \
    --to=tomaz.solc@klevio.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox