]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
package/uboot: detect missing user-supplied environment source files
authorYann E. MORIN <yann.morin.1998@free.fr>
Sat, 9 Dec 2017 11:35:49 +0000 (12:35 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 14 Dec 2017 05:37:13 +0000 (06:37 +0100)
commitc9b6604fa7871087120cd8a469452807d14a4c1c
tree1b3d8c0931ff783ff14bf0978ad2e4c773b0258c
parent8636a3cbefdfd03a39cfe1ccda024b95fb0ba7f1
package/uboot: detect missing user-supplied environment source files

Since 0542bb79e8 (uboot: Support multiple environment source files),
missing user-supplied environment source files is no longer detected.

This is because we cat them all, and feed the concatenation to the stdin
of mkenvimage. So, if one source file is missing, the cat exits in error,
but the compound command exits with the exit code of the last command,
which is that of mkenvimage, which happens to be happy with whatever it
is fed on its stdin, even is empty.

We fix that by creating a temporary file, that we even leave afterward
for the user to inspect.

We also move it out of the _CMDS block and into a macro of its own, so
that it is easier to write and maintain.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Cam Hutchison <camh@xdna.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
boot/uboot/uboot.mk