Re: [U-Boot-Users] v1.3.4-rc1 released

Hello Wolfgang,
Wolfgang Denk wrote:
Dear Heiko,
in message 487E4C16.5050603@invitel.hu you wrote:
diff --git a/include/configs/sc3.h b/include/configs/sc3.h index f6e40de..0ff889a 100644 --- a/include/configs/sc3.h +++ b/include/configs/sc3.h @@ -132,7 +132,8 @@
#if 1 /* feel free to disable for development */ #define CONFIG_AUTOBOOT_KEYED /* Enable password protection */ -#define CONFIG_AUTOBOOT_PROMPT "\nSC3 - booting... stop with ENTER\n" +#define CONFIG_AUTOBOOT_PROMPT "\nSC3 - booting in %d seconds ..." \
" stop with ENTER\n"
#define CONFIG_AUTOBOOT_DELAY_STR "\r" /* 1st "password" */ #define CONFIG_AUTOBOOT_DELAY_STR2 "\n" /* 1st "password" */ #endif
Didnt know this ... so we must change something in common/main.c :-(
Whats with something like this?
diff --git a/common/main.c b/common/main.c index 79ad291..a8d05f4 100644 --- a/common/main.c +++ b/common/main.c @@ -87,6 +87,13 @@ int do_mdm_init = 0; extern void mdm_init(void); /* defined in board.c */ #endif
+void __autoboot_prompt(int bootdelay) +{ + return; +} +void inline autoboot_prompt(int bootdelay) + __attribute__((weak, alias("__autoboot_prompt"))); + /*************************************************************************** * Watch for 'delay' seconds for autoboot stop or autoboot delay string. * returns: 0 - no key string, allow autoboot @@ -115,9 +122,7 @@ static __inline__ int abortboot(int bootdelay) u_int presskey_max = 0; u_int i;
-# ifdef CONFIG_AUTOBOOT_PROMPT - printf(CONFIG_AUTOBOOT_PROMPT, bootdelay); -# endif + autoboot_prompt(bootdelay);
# ifdef CONFIG_AUTOBOOT_DELAY_STR if (delaykey[0].str == NULL)
and of course, we must also fix all boards which use CONFIG_AUTOBOOT_PROMPT :-(
bye Heiko

In message 487EE97F.8010603@denx.de you wrote:
Didnt know this ... so we must change something in common/main.c :-(
Yes.
Whats with something like this?
Looks way too complicated to me. What do you think about the PATCH / RFC I posted yesterday?
Best regards,
Wolfgang Denk

Hello Wolfgang,
Wolfgang Denk wrote:
In message 487EE97F.8010603@denx.de you wrote:
Whats with something like this?
Looks way too complicated to me. What do you think about the PATCH / RFC I posted yesterday?
Why complicated? I think (means that I must verify it) the compiler shouldnt generate code when using the default function. And every board writer have a nice function, where he can print whatever he wants, and my feeling is better when using a function than a define with a argument list ...
bye, Heiko

Wolfgang Denk wrote:
In message 487EE97F.8010603@denx.de you wrote:
Didnt know this ... so we must change something in common/main.c :-(
Yes.
Whats with something like this?
Looks way too complicated to me. What do you think about the PATCH / RFC I posted yesterday?
Best regards,
Wolfgang Denk
I presume you considered and discarded using a special #define (e.g. CONFIG_AUTOBOOT_PROMPT_0) for the no value case. It only hurts our #ifdef hellcount a little and changes our "touch" count from <all> to 5 (4 if I fix sacsng).
diff --git a/common/main.c b/common/main.c index 79ad291..09e6033 100644 --- a/common/main.c +++ b/common/main.c @@ -115,8 +115,10 @@ static __inline__ int abortboot(int bootdelay) u_int presskey_max = 0; u_int i;
-# ifdef CONFIG_AUTOBOOT_PROMPT +# if defined(CONFIG_AUTOBOOT_PROMPT) printf(CONFIG_AUTOBOOT_PROMPT, bootdelay); +# elif defined(CONFIG_AUTOBOOT_PROMPT_0) + c # endif
# ifdef CONFIG_AUTOBOOT_DELAY_STR

Jerry Van Baren wrote:
Wolfgang Denk wrote:
In message 487EE97F.8010603@denx.de you wrote:
Didnt know this ... so we must change something in common/main.c :-(
Yes.
Whats with something like this?
Looks way too complicated to me. What do you think about the PATCH / RFC I posted yesterday?
Best regards,
Wolfgang Denk
I presume you considered and discarded using a special #define (e.g. CONFIG_AUTOBOOT_PROMPT_0) for the no value case. It only hurts our #ifdef hellcount a little and changes our "touch" count from <all> to 5 (4 if I fix sacsng).
diff --git a/common/main.c b/common/main.c index 79ad291..09e6033 100644 --- a/common/main.c +++ b/common/main.c @@ -115,8 +115,10 @@ static __inline__ int abortboot(int bootdelay) u_int presskey_max = 0; u_int i;
-# ifdef CONFIG_AUTOBOOT_PROMPT +# if defined(CONFIG_AUTOBOOT_PROMPT) printf(CONFIG_AUTOBOOT_PROMPT, bootdelay); +# elif defined(CONFIG_AUTOBOOT_PROMPT_0)
c
Arrr, missed the <ctl> key and other sorts of evil + printf(CONFIG_AUTOBOOT_PROMPT_0);
# endif
# ifdef CONFIG_AUTOBOOT_DELAY_STR

Hello Jerry,
Jerry Van Baren wrote:
Jerry Van Baren wrote:
Wolfgang Denk wrote:
In message 487EE97F.8010603@denx.de you wrote:
Didnt know this ... so we must change something in common/main.c :-(
Yes.
Whats with something like this?
Looks way too complicated to me. What do you think about the PATCH / RFC I posted yesterday?
Best regards,
Wolfgang Denk
I presume you considered and discarded using a special #define (e.g. CONFIG_AUTOBOOT_PROMPT_0) for the no value case. It only hurts our #ifdef hellcount a little and changes our "touch" count from <all> to 5 (4 if I fix sacsng).
diff --git a/common/main.c b/common/main.c index 79ad291..09e6033 100644 --- a/common/main.c +++ b/common/main.c @@ -115,8 +115,10 @@ static __inline__ int abortboot(int bootdelay) u_int presskey_max = 0; u_int i;
-# ifdef CONFIG_AUTOBOOT_PROMPT +# if defined(CONFIG_AUTOBOOT_PROMPT) printf(CONFIG_AUTOBOOT_PROMPT, bootdelay); +# elif defined(CONFIG_AUTOBOOT_PROMPT_0)
c
Arrr, missed the <ctl> key and other sorts of evil
printf(CONFIG_AUTOBOOT_PROMPT_0);
Hmm.. and if somebody wants to print more variables we make more defines, maybe for every board +1 define? I vote for making this in a weak function, and each board code can print what he wants ...
bye Heiko
participants (4)
-
Heiko Schocher
-
Jerry Van Baren
-
Jerry Van Baren
-
Wolfgang Denk