bootstage: Fix build error for standalone API example
PATCH 1/1 bootstage: Fix build error for standalone API example
This example doesn't have get_timer() defined, which causes build breakages.
Add #ifdef guards to work around this.
--- lib/time.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
lib/time.c +2 -0
@@ -48,6 +48,7 @@ void mdelay(unsigned long msec)udelay (1000 ); } +#ifdef CONFIG_BOOTSTAGE ulong __timer_get_boot_us (void ) {static ulong base_time;
@@ -64,3 +65,4 @@ ulong __timer_get_boot_us(void)ulong timer_get_boot_us (void ) __attribute__((weak,alias ("__timer_get_boot_us" ))); +#endif
Signature · 1 line
1.7.7.3
PATCH 1/1 bootstage: Fix build error for standalone API example
Hi Simon,
Quoted 22 lines · On Mon, 19 Mar 2012 22:49:30 -0700 Simon Glass <[email protected]> wrote:
This example doesn't have
get_timer()defined, which causes build breakages.Add #ifdef guards to work around this.
Signed-off-by Simon Glass <[email protected]>--- lib/time.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)lib/time.c +1
-0@@ -48,6 +48,7 @@ void mdelay(unsigned long msec)udelay (1000 ); } +#ifdef CONFIG_BOOTSTAGE ulong __timer_get_boot_us (void ) {static ulong base_time;
lib/time.c ulong __timer_get_boot_us(void) · line 68
Quoted 4 lines
lib/time.c +1
-0@@ -64,3 +65,4 @@ ulong __timer_get_boot_us(void)ulong timer_get_boot_us (void ) __attribute__((weak,alias ("__timer_get_boot_us" ))); +#endif
Isn't it better to move timer_get_boot_us() to common/bootstage.c ? Or is there a plan to use this function not only in bootstage code?
Thanks,
Anatolij
PATCH 1/1 bootstage: Fix build error for standalone API example
Hi Anatolij,
Quoted 28 lines · Anatolij Gustschin
Hi Simon,
Quoted 23 lines · On Mon, 19 Mar 2012 22:49:30 -0700 Simon Glass <[email protected]> wrote:
This example doesn't have
get_timer()defined, which causes build breakages.Add #ifdef guards to work around this.
Signed-off-by Simon Glass <[email protected]>---
?lib/time.c | ? ?2 ++
?1 files changed, 2 insertions(+), 0 deletions(-)lib/time.c +1
-0@@ -48,6 +48,7 @@ void mdelay(unsigned long msec) ? ? ? ? ? ? ? udelay(1000); ?} +#ifdef CONFIG_BOOTSTAGE ?ulong __timer_get_boot_us(void) ?{ ? ? ? static ulong base_time;@@ -64,3 +65,4 @@ ulong __timer_get_boot_us(void)
Quoted 6 lines
lib/time.c ulong __timer_get_boot_us(void) · line 68
Quoted 3 lines
lib/time.c +1
-0?ulong timer_get_boot_us(void) ? ? ? __attribute__((weak, alias("__timer_get_boot_us"))); +#endif Isn't it better to move
timer_get_boot_us()tocommon/bootstage.c? Or is there a plan to use this function not only in bootstage code?
Yes I sent through the smallest fix.
But as I said in the patch thread I am not sure which is best.
I'm happy to do it either way, so let me know and I can do a patch the other way.
Regards,
Simon
Quoted 3 lines
Thanks,
Anatolij
PATCH 1/1 bootstage: Fix build error for standalone API example
Dear Simon Glass,
Quoted 10 lines · In message <CAPnjgZ3of9HxpFrtoMh+tuLDQ7SX4fOVgkU9t=VtWmTukthaxA@mail.gmail.com>…
Quoted 3 lines
Isn't it better to move
timer_get_boot_us()tocommon/bootstage.c? Or is there a plan to use this function not only in bootstage code?Yes I sent through the smallest fix.
But as I said in the patch thread I am not sure which is best.
I'm happy to do it either way, so let me know and I can do a patch the other way.
This is still open, right? If so, then please follow Anatolij';s suggestion. Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You can do this in a number of ways. IBM chose to do all of them. Why do you find that funny? -- D. Taylor, Computer Science 350
PATCH 1/1 bootstage: Fix build error for standalone API example
Hi Wolfgang,
Quoted 10 lines · Wolfgang Denk
Dear Simon Glass,
In message <CAPnjgZ3of9HxpFrtoMh+tuLDQ7SX4fOVgkU9t=
Quoted 6 lines · VtWmTukthaxA at mail.gmail.com> you wrote:
Quoted 3 lines
Isn't it better to move
timer_get_boot_us()tocommon/bootstage.c? Or is there a plan to use this function not only in bootstage code?Yes I sent through the smallest fix.
Quoted 8 lines
Quoted 4 lines
But as I said in the patch thread I am not sure which is best.
I'm happy to do it either way, so let me know and I can do a patch the other way.
This is still open, right? If so, then please follow Anatolij';s suggestion. Thanks.
No, this has been tidied up now with this commit:
3786980 Move bootstage timer out of lib/time.c
Regards,
Simon
Quoted 12 lines
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You can do this in a number of ways. IBM chose to do all of them.
Why do you find that funny? -- D. Taylor, Computer Science 350