[U-Boot] [RFC PATCH v2 15/15] bootstage: arm: Add bootstage calls in board and bootm
Mike Frysinger
vapier at gentoo.org
Mon Jan 9 18:31:58 CET 2012
On Sunday 08 January 2012 18:48:18 Simon Glass wrote:
> On Sun, Jan 8, 2012 at 11:58 AM, Mike Frysinger wrote:
> > On Sunday 08 January 2012 12:43:09 Simon Glass wrote:
> >> On Sun, Jan 8, 2012 at 12:36 AM, Mike Frysinger wrote:
> >> > On Saturday 10 December 2011 16:08:07 Simon Glass wrote:
> >> >> --- a/arch/arm/lib/bootm.c
> >> >> +++ b/arch/arm/lib/bootm.c
> >> >>
> >> >> static void announce_and_cleanup(void)
> >> >> {
> >> >> printf("\nStarting kernel ...\n\n");
> >> >> + bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF,
> >> >> "start_kernel"); +#ifdef CONFIG_BOOTSTAGE_REPORT
> >> >> + bootstage_report();
> >> >> +#endif
> >> >
> >> > shouldn't the header make bootstage_report() into a stub when
> >> > CONFIG_BOOTSTAGE_REPORT isn't defined ? then you won't need the ifdef
> >> > protection here.
> >>
> >> Well maybe. I am hoping for a link error if someone calls it without
> >> defining that CONFIG. Otherwise it could be very confusing for people
> >> that they can't get a report!
> >
> > i'm not sure we need worry about that
>
> I have had another look at this. The idea is that anyone can call
> bootstage_report() to get a report, but if they define
> CONFIG_BOOTSTAGE_REPORT then one is printing automatically by U-Boot
> just before jumping to the kernel.
>
> So I don't want this define to remove the ability to print a report,
> just to enable printing a report at a time which is hopefully
> suitable.
>
> Does that make sense?
ok, so we have:
#ifdef CONFIG_BOOTSTAGE
extern void bootstage_report(void);
#else
#define bootstage_report()
#endif
and CONFIG_BOOTSTAGE_REPORT controls the automatic calls to the report func
is the arm-specific bootm hooks the best place for this ? wouldn't putting
this into the common bootm code be better ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120109/0804d153/attachment.pgp>
More information about the U-Boot
mailing list