diff mbox

[U-Boot,1/3] MIPS: VCT: Fix enabling of unwanted options if networking or USB support are disabled

Message ID 1296734392-15203-2-git-send-email-daniel.schwierzeck@googlemail.com
State Superseded, archived
Headers show

Commit Message

Daniel Schwierzeck Feb. 3, 2011, 11:59 a.m. UTC
Some VCT boards lacks the support of networking or USB.
Additionally that support is disabled in small image
configurations.

If CONFIG_CMD_NET should not used the CONFIG_CMD_NFS option
have to be disabled too. Otherwise the linker fails with
unresolved symbols.

If CONFIG_VCT_SMALL_IMAGE is set than CONFIG_CMD_NET and
CONFIG_CMD_USB are disabled at the end of vct.h.
This is not adequate because CONFIG_CMD_USB enables additional
options and the linker fails again with unresolved symbols.

This patch adds an early check against CONFIG_VCT_SMALL_IMAGE
so the additional options are only enabled if they are really
needed.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Cc: Stefan Roese <sr@denx.de>
---
 include/configs/vct.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

--
1.7.3.5

Comments

Stefan Roese Feb. 3, 2011, 12:12 p.m. UTC | #1
Hi Daniel,

On Thursday 03 February 2011 12:59:50 daniel.schwierzeck@googlemail.com wrote:
> Some VCT boards lacks the support of networking or USB.
> Additionally that support is disabled in small image
> configurations.
> 
> If CONFIG_CMD_NET should not used the CONFIG_CMD_NFS option
> have to be disabled too. Otherwise the linker fails with
> unresolved symbols.
> 
> If CONFIG_VCT_SMALL_IMAGE is set than CONFIG_CMD_NET and
> CONFIG_CMD_USB are disabled at the end of vct.h.
> This is not adequate because CONFIG_CMD_USB enables additional
> options and the linker fails again with unresolved symbols.
> 
> This patch adds an early check against CONFIG_VCT_SMALL_IMAGE
> so the additional options are only enabled if they are really
> needed.
> 
> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
> Cc: Stefan Roese <sr@denx.de>
> ---
>  include/configs/vct.h |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/include/configs/vct.h b/include/configs/vct.h
> index 4894969..8162217 100644
> --- a/include/configs/vct.h
> +++ b/include/configs/vct.h
> @@ -109,17 +109,20 @@
>  /*
>   * Only Premium/Platinum have ethernet support right now
>   */
> -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
> +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)) && \
> +	!defined CONFIG_VCT_SMALL_IMAGE

I would prefer consistent style with braces around CONFIG_VCT_SMALL_IMAGE 
here.

>  #define CONFIG_CMD_PING
>  #define CONFIG_CMD_SNTP
>  #else
>  #undef CONFIG_CMD_NET
> +#undef CONFIG_CMD_NFS
>  #endif
> 
>  /*
>   * Only Premium/Platinum have USB-EHCI support right now
>   */
> -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
> +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)) && \
> +	!defined CONFIG_VCT_SMALL_IMAGE

Same here. Otherwise:

Acked-by: Stefan Roese <sr@denx.de>

Thanks.

Cheers,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de
Daniel Schwierzeck Feb. 3, 2011, 12:31 p.m. UTC | #2
Hi Stefan,

>
>> * Only Premium/Platinum have ethernet support right now
>
>> */
>
>> -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
>
>> +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)) && \
>
>> + !defined CONFIG_VCT_SMALL_IMAGE
>
> I would prefer consistent style with braces around CONFIG_VCT_SMALL_IMAGE
> here.
Ok I'll change this.

>
>> #define CONFIG_CMD_PING
>
>> #define CONFIG_CMD_SNTP
>
>> #else
>
>> #undef CONFIG_CMD_NET
>
>> +#undef CONFIG_CMD_NFS
>
>> #endif
>
>>
>
>> /*
>
>> * Only Premium/Platinum have USB-EHCI support right now
>
>> */
>
>> -#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
>
>> +#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)) && \
>
>> + !defined CONFIG_VCT_SMALL_IMAGE
>
> Same here. Otherwise:
Dito.

Thanks

Daniel
diff mbox

Patch

diff --git a/include/configs/vct.h b/include/configs/vct.h
index 4894969..8162217 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -109,17 +109,20 @@ 
 /*
  * Only Premium/Platinum have ethernet support right now
  */
-#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
+#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)) && \
+	!defined CONFIG_VCT_SMALL_IMAGE
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_SNTP
 #else
 #undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
 #endif

 /*
  * Only Premium/Platinum have USB-EHCI support right now
  */
-#if defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)
+#if (defined(CONFIG_VCT_PREMIUM) || defined(CONFIG_VCT_PLATINUM)) && \
+	!defined CONFIG_VCT_SMALL_IMAGE
 #define CONFIG_CMD_USB
 #define CONFIG_CMD_FAT
 #endif