On Tue, Aug 21, 2018 at 01:23:28PM -0700, Andrey Smirnov wrote: > On Tue, Aug 21, 2018 at 3:07 AM Roland Hieber <r.hieber@xxxxxxxxxxxxxx> wrote: > > > > Hello Andrey, > > > > On Mon, Aug 20, 2018 at 11:25:43PM -0700, Andrey Smirnov wrote: > > > Modify file_detect_type() and add code needed to be able to detect > > > i.MX boot images with v1 header. > > > > > > Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx> > > > --- > > > common/filetype.c | 7 +++++++ > > > include/filetype.h | 1 + > > > 2 files changed, 8 insertions(+) > > > > > > diff --git a/common/filetype.c b/common/filetype.c > > > index c5f2384a6..f68a83bec 100644 > > > --- a/common/filetype.c > > > +++ b/common/filetype.c > > > @@ -29,6 +29,8 @@ > > > #include <image-sparse.h> > > > #include <elf.h> > > > > > > +#include <../mach-imx/include/mach/imx-header.h> > > > > This fails at least on ARCH=sandbox: > > > > common/filetype.c:32:10: fatal error: ../mach-imx/include/mach/imx-header.h: No such file or directory > > #include <../mach-imx/include/mach/imx-header.h> > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > I guess it could be solved with an #ifdef ARCH_IMX. > > > > Good catch! I'll make sure to test against ARCH=sandbox when preparing > v2 of the set. An include path of the form <../mach-imx/> strikes me as a rather odd thing to have in code that should be machine-independent. Maybe it is better to isolate the respective symbols from imx-header.h into a generic header file that can live in the same path as e.g. <elf.h>. This way we could also be able to detect IMX images on ARCH=sandbox :) - Roland -- Roland Hieber | r.hieber@xxxxxxxxxxxxxx | Pengutronix e.K. | https://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox