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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox