[U-Boot] [PATCH] mvebu: turris_omnia: Only set eth?addr env if CONFIG_CMD_NET
Stefan Roese
sr at denx.de
Mon Sep 4 06:42:19 UTC 2017
Hi Marek,
On 03.09.2017 15:13, Marek BehĂșn wrote:
> Otherwise the linking will fail since eth_env_set_enetaddr cannot
> be found.
>
> Signed-off-by: Marek Behun <marek.behun at nic.cz>
> ---
> board/CZ.NIC/turris_omnia/turris_omnia.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c
> index af66837909..7db3b8ff3b 100644
> --- a/board/CZ.NIC/turris_omnia/turris_omnia.c
> +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c
> @@ -470,6 +470,7 @@ out:
> return 0;
> }
>
> +#if defined(CONFIG_ATSHA204A) && defined(CONFIG_CMD_NET)
> static void increment_mac(u8 *mac)
> {
> int i;
> @@ -480,10 +481,11 @@ static void increment_mac(u8 *mac)
> break;
> }
> }
> +#endif
>
> int misc_init_r(void)
> {
> -#ifdef CONFIG_ATSHA204A
> +#if defined(CONFIG_ATSHA204A) && defined(CONFIG_CMD_NET)
> int err;
> struct udevice *dev = get_atsha204a_dev();
> u8 mac0[4], mac1[4], mac[6];
>
Perhaps its better to select or imply ATSHA204A and CMD_NET for
turris_omnia in Kconfig instead. You can then remove all the #ifdef's
from the code here.
Just curious:
Where did you see this compile / linking problem. Compiling current
mainline does not cause any issues.
Thanks,
Stefan
More information about the U-Boot
mailing list