* [ECOS] customizing redboot build
@ 2009-02-12 17:01 Jacob Avraham
2009-02-12 18:09 ` Chris Zimman
0 siblings, 1 reply; 4+ messages in thread
From: Jacob Avraham @ 2009-02-12 17:01 UTC (permalink / raw)
To: ecos-discuss
Hi,
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?
Thanks,
Jacob
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [ECOS] customizing redboot build
2009-02-12 17:01 [ECOS] customizing redboot build Jacob Avraham
@ 2009-02-12 18:09 ` Chris Zimman
2009-02-15 9:13 ` Jacob Avraham
0 siblings, 1 reply; 4+ messages in thread
From: Chris Zimman @ 2009-02-12 18:09 UTC (permalink / raw)
To: Jacob Avraham, ecos-discuss
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [ECOS] customizing redboot build
2009-02-12 18:09 ` Chris Zimman
@ 2009-02-15 9:13 ` Jacob Avraham
2009-02-15 22:17 ` Chris Zimman
0 siblings, 1 reply; 4+ messages in thread
From: Jacob Avraham @ 2009-02-15 9:13 UTC (permalink / raw)
To: Chris Zimman, ecos-discuss
>
> > 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
>
I am familiar with the files above. The question is how to I pass the -DMY_ADDITIONAL_CRUFT stuff
from my own build script (part of a larger system build) to the gcc command that compiles these files,
as it is called from Ecos automatically-generated makefiles.
-Jacob
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [ECOS] customizing redboot build
2009-02-15 9:13 ` Jacob Avraham
@ 2009-02-15 22:17 ` Chris Zimman
0 siblings, 0 replies; 4+ messages in thread
From: Chris Zimman @ 2009-02-15 22:17 UTC (permalink / raw)
To: Jacob Avraham, ecos-discuss
> I am familiar with the files above. The question is how to I pass the -
> DMY_ADDITIONAL_CRUFT stuff
> from my own build script (part of a larger system build) to the gcc
> command that compiles these files,
> as it is called from Ecos automatically-generated makefiles.
You are going to either have to modify the CDL files or the Makefiles
themselves. I would recommend the CDL files as that way your changes will be
preserved in any subsequent target trees you produce.
The CDL file you probably want is:
packages/redboot/[version]/cdl/redboot.cdl
If you're not familiar with CDL files and their use, the eCos documentation
is your next stop.
--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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-15 22:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-12 17:01 [ECOS] customizing redboot build Jacob Avraham
2009-02-12 18:09 ` Chris Zimman
2009-02-15 9:13 ` Jacob Avraham
2009-02-15 22:17 ` Chris Zimman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).