[U-Boot] [PATCH 2/2] armv8: ls2085a: Add support of random MAC address

Bin Meng bmeng.cn at gmail.com
Wed Oct 7 12:18:13 CEST 2015


Hi Prabhakar,

On Wed, Oct 7, 2015 at 6:00 PM, Prabhakar Kushwaha
<prabhakar at freescale.com> wrote:
> Add support of setting RANDOM MAC address if env variable not available.
>
> Signed-off-by: Prabhakar Kushwaha <prabhakar at freescale.com>
> ---
> Changs for v2: Incorporated Bin Meng's comments
>  - Moved defines to defconfig
>  - updated subject
>
>  configs/ls2085a_simu_defconfig    | 2 ++
>  configs/ls2085aqds_defconfig      | 2 ++
>  configs/ls2085aqds_nand_defconfig | 2 ++
>  configs/ls2085ardb_defconfig      | 2 ++
>  configs/ls2085ardb_nand_defconfig | 2 ++
>  5 files changed, 10 insertions(+)
>
> diff --git a/configs/ls2085a_simu_defconfig b/configs/ls2085a_simu_defconfig
> index de9776d..0c450a9 100644
> --- a/configs/ls2085a_simu_defconfig
> +++ b/configs/ls2085a_simu_defconfig
> @@ -1,6 +1,8 @@
>  CONFIG_ARM=y
>  CONFIG_TARGET_LS2085A_SIMU=y
>  CONFIG_SYS_EXTRA_OPTIONS="SIMU"
> +CONFIG_LIB_RAND=y

This is not needed as it is selected by CONFIG_NET_RANDOM_ETHADDR automatically.

> +CONFIG_NET_RANDOM_ETHADDR=y
>  # CONFIG_CMD_CONSOLE is not set
>  # CONFIG_CMD_IMLS is not set
>  # CONFIG_CMD_XIMG is not set
> diff --git a/configs/ls2085aqds_defconfig b/configs/ls2085aqds_defconfig
> index 0c770e4..267ad95 100644
> --- a/configs/ls2085aqds_defconfig
> +++ b/configs/ls2085aqds_defconfig
> @@ -11,3 +11,5 @@ CONFIG_DM=y
>  CONFIG_NETDEVICES=y
>  CONFIG_E1000=y
>  CONFIG_FSL_DSPI=y
> +CONFIG_LIB_RAND=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> diff --git a/configs/ls2085aqds_nand_defconfig b/configs/ls2085aqds_nand_defconfig
> index 10eda97..916504a 100644
> --- a/configs/ls2085aqds_nand_defconfig
> +++ b/configs/ls2085aqds_nand_defconfig
> @@ -5,3 +5,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND"
>  # CONFIG_CMD_SETEXPR is not set
>  CONFIG_NETDEVICES=y
>  CONFIG_E1000=y
> +CONFIG_LIB_RAND=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> diff --git a/configs/ls2085ardb_defconfig b/configs/ls2085ardb_defconfig
> index 7956533..3f8be26 100644
> --- a/configs/ls2085ardb_defconfig
> +++ b/configs/ls2085ardb_defconfig
> @@ -11,3 +11,5 @@ CONFIG_DM=y
>  CONFIG_NETDEVICES=y
>  CONFIG_E1000=y
>  CONFIG_FSL_DSPI=y
> +CONFIG_LIB_RAND=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> diff --git a/configs/ls2085ardb_nand_defconfig b/configs/ls2085ardb_nand_defconfig
> index 96a0dfd..5fb1901 100644
> --- a/configs/ls2085ardb_nand_defconfig
> +++ b/configs/ls2085ardb_nand_defconfig
> @@ -5,3 +5,5 @@ CONFIG_SYS_EXTRA_OPTIONS="SYS_FSL_DDR4,NAND"
>  # CONFIG_CMD_SETEXPR is not set
>  CONFIG_NETDEVICES=y
>  CONFIG_E1000=y
> +CONFIG_LIB_RAND=y
> +CONFIG_NET_RANDOM_ETHADDR=y
> --

Also please make sure adding these Kconfig options with correct order.
You can do this by for example, 'make ls2085a_simu_defconfig' then
'make savedefconfig'

Regards,
Bin


More information about the U-Boot mailing list