This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
RE: customizing redboot build
- From: "Chris Zimman" <czimman at bloomberg dot com>
- To: "Jacob Avraham" <jacob at imaginecommunications dot com>, <ecos-discuss at ecos dot sourceware dot org>
- Date: Thu, 12 Feb 2009 13:08:15 -0500
- Subject: RE: [ECOS] customizing redboot build
- References: <FF584854D6FFE547AB2F7515A798AC3A045720189E@venus.imagineil.tv>
> 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?
See:
packages/redboot/[version]/src/version.c
and
the function do_version() in packages/redboot/[version]/src/main.c
You can easily add whatever you want here statically or at compile time.
eg.
[...]
diag_printf("Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat,
Inc.\n");
diag_printf("Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 eCosCentric
Limited\n\n");
diag_printf("RAM: %p-%p, ", (void*)ram_start, (void*)ram_end);
diag_printf("[%p-%p]", mem_segments[0].start, mem_segments[0].end);
diag_printf(" available\n");
[...]
diag_printf(MY_ADDTIONAL_CRUFT);
[...]
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.
--Chris
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss