[U-Boot] [PATCH] Add CONFIG_HDBOOTCOMMAND to the environment

Provide a boot command for being able to boot from a hard drive
Signed-off-by: Kumar Gala galak@kernel.crashing.org --- common/env_common.c | 3 +++ common/environment.c | 3 +++ tools/env/fw_env.c | 3 +++ 3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/common/env_common.c b/common/env_common.c index d51c211..271e71f 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -64,6 +64,9 @@ uchar default_environment[] = { #ifdef CONFIG_BOOTCOMMAND "bootcmd=" CONFIG_BOOTCOMMAND "\0" #endif +#ifdef CONFIG_HDBOOTCOMMAND + "hdboot=" CONFIG_HDBOOTCOMMAND "\0" +#endif #ifdef CONFIG_RAMBOOTCOMMAND "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" #endif diff --git a/common/environment.c b/common/environment.c index 3b9914f..17377a7 100644 --- a/common/environment.c +++ b/common/environment.c @@ -108,6 +108,9 @@ env_t environment __PPCENV__ = { #if defined(CONFIG_BOOTCOMMAND) "bootcmd=" CONFIG_BOOTCOMMAND "\0" #endif +#ifdef CONFIG_HDBOOTCOMMAND + "hdboot=" CONFIG_HDBOOTCOMMAND "\0" +#endif #if defined(CONFIG_RAMBOOTCOMMAND) "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" #endif diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index b8bca91..6520c22 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -87,6 +87,9 @@ static char default_environment[] = { #if defined(CONFIG_BOOTCOMMAND) "bootcmd=" CONFIG_BOOTCOMMAND "\0" #endif +#ifdef CONFIG_HDBOOTCOMMAND + "hdboot=" CONFIG_HDBOOTCOMMAND "\0" +#endif #if defined(CONFIG_RAMBOOTCOMMAND) "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" #endif

Dear Kumar Gala,
In message 1219350079-25416-1-git-send-email-galak@kernel.crashing.org you wrote:
Provide a boot command for being able to boot from a hard drive
Signed-off-by: Kumar Gala galak@kernel.crashing.org
common/env_common.c | 3 +++ common/environment.c | 3 +++ tools/env/fw_env.c | 3 +++ 3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/common/env_common.c b/common/env_common.c index d51c211..271e71f 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -64,6 +64,9 @@ uchar default_environment[] = { #ifdef CONFIG_BOOTCOMMAND "bootcmd=" CONFIG_BOOTCOMMAND "\0" #endif +#ifdef CONFIG_HDBOOTCOMMAND
- "hdboot=" CONFIG_HDBOOTCOMMAND "\0"
+#endif #ifdef CONFIG_RAMBOOTCOMMAND "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" #endif
The percentage of boards that actually have a HDD is so small that I do not think such an addition to these global files is justified, especially since it is trivial to add a definition of such an environment variable through a CONFIG_EXTRA_ENV_SETTINGS definition.
Or is there a specific reason why CONFIG_EXTRA_ENV_SETTINGS would not work for you?
Best regards,
Wolfgang Denk

On Aug 21, 2008, at 6:35 PM, Wolfgang Denk wrote:
Dear Kumar Gala,
In message <1219350079-25416-1-git-send-email-galak@kernel.crashing.org
you wrote: Provide a boot command for being able to boot from a hard drive
Signed-off-by: Kumar Gala galak@kernel.crashing.org
common/env_common.c | 3 +++ common/environment.c | 3 +++ tools/env/fw_env.c | 3 +++ 3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/common/env_common.c b/common/env_common.c index d51c211..271e71f 100644 --- a/common/env_common.c +++ b/common/env_common.c @@ -64,6 +64,9 @@ uchar default_environment[] = { #ifdef CONFIG_BOOTCOMMAND "bootcmd=" CONFIG_BOOTCOMMAND "\0" #endif +#ifdef CONFIG_HDBOOTCOMMAND
- "hdboot=" CONFIG_HDBOOTCOMMAND "\0"
+#endif #ifdef CONFIG_RAMBOOTCOMMAND "ramboot=" CONFIG_RAMBOOTCOMMAND "\0" #endif
The percentage of boards that actually have a HDD is so small that I do not think such an addition to these global files is justified, especially since it is trivial to add a definition of such an environment variable through a CONFIG_EXTRA_ENV_SETTINGS definition.
Or is there a specific reason why CONFIG_EXTRA_ENV_SETTINGS would not work for you?
Nope, that solution works as good as any.
- k
participants (2)
-
Kumar Gala
-
Wolfgang Denk