[ECOS] customizing redboot build
Thu Feb 12 18:09:00 GMT 2009
> I want to add a string to the redboot version string (or for that
> matter to my own string), that get changed every time I run make. In
> other systems I did it with a parameter that I passed to make, like
> "make MY_VAR=my_value some_target".
> But in redboot all the Makefiles are auto-generated.
> How do I get around to do that?
the function do_version() in packages/redboot/[version]/src/main.c
You can easily add whatever you want here statically or at compile time.
diag_printf("Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat,
diag_printf("Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 eCosCentric
diag_printf("RAM: %p-%p, ", (void*)ram_start, (void*)ram_end);
diag_printf("[%p-%p]", mem_segments.start, mem_segments.end);
gcc [...] -DMY_ADDITIONAL_CRUFT=\""Whatever extra info you wanted\"" main.c
There are a multitude of ways to do this. You could do it in the CDL files,
etc. -- the choice is left as an exercise for the reader.
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss