]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
toradex: common: Use random mac address if toradex config block is missing
authorEmanuele Ghidoli <emanuele.ghidoli@toradex.com>
Fri, 23 Feb 2024 09:11:42 +0000 (10:11 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 1 Mar 2024 14:10:44 +0000 (09:10 -0500)
Set CONFIG_NET_RANDOM_ETHADDR=y, which sets random eth address in
case there is no toradex config block programmed.
In case of missing toradex config block the generated mac address was
always the same, linked to serial number 0.
Use random generated mac address instead.

Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> # Verdin iMX8M Plus
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
17 files changed:
board/toradex/common/tdx-common.c
configs/apalis-imx8_defconfig
configs/apalis-tk1_defconfig
configs/apalis_imx6_defconfig
configs/apalis_t30_defconfig
configs/colibri-imx6ull-emmc_defconfig
configs/colibri-imx6ull_defconfig
configs/colibri-imx8x_defconfig
configs/colibri_imx6_defconfig
configs/colibri_imx7_defconfig
configs/colibri_imx7_emmc_defconfig
configs/colibri_t20_defconfig
configs/colibri_t30_defconfig
configs/colibri_vf_defconfig
configs/verdin-am62_a53_defconfig
configs/verdin-imx8mm_defconfig
configs/verdin-imx8mp_defconfig

index 1f3253f4222e92adb65c9ea1926822ac9f3a98bf..9f09788137d595368b0301e3d8ed627d12176764 100644 (file)
@@ -126,7 +126,6 @@ static int settings_r(void)
 
        if (read_tdx_cfg_block()) {
                printf("MISSING TORADEX CONFIG BLOCK\n");
-               get_mac_from_serial(tdx_serial, &tdx_eth_addr);
 
                /* Board can run even if config block is not present */
                return 0;
index 982098d8142059c860c9c8c9c83a2b4065049e3f..da3b0e254899aab900870248c3c8e1ecfbcc6deb 100644 (file)
@@ -52,6 +52,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_TFTP_TSIZE=y
index 6ed3898b60c35019f9c6b196c4dd8aae431cf496..20c9c06cdeace53ec43dffd5d0fdd2b17e833ff3 100644 (file)
@@ -52,6 +52,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_TFTP_TSIZE=y
index 05ff6fa115ceb6b96078ef4bacd7833a5b5e73f2..492550607035616bb1a902dfcd70e13f42ab5e56 100644 (file)
@@ -75,6 +75,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_USE_IPADDR=y
index 0a27509a97e6440cc68c38560a9e22e003c79a52..03a1f2c2390697ca2367102c35ccdbca1301b981 100644 (file)
@@ -45,6 +45,7 @@ CONFIG_OF_LIVE=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_TFTP_TSIZE=y
index 285fed9e4faf4ae19ec7ef03e83ea723a475058b..2b04855770ab7d4b0fba1b2af68763df81ca73f2 100644 (file)
@@ -51,6 +51,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_TFTP_TSIZE=y
index a8a633063d007092ff342e8ae9aefaa59d146954..959930cf2e31bf415bbed1250add523822bfe295 100644 (file)
@@ -60,6 +60,7 @@ CONFIG_ENV_RANGE=0x80000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_TFTP_TSIZE=y
index aa18d28d3e6d49e33c6cf175495a37b7ab925c92..88928b0e4bc5d4a91627bfcaa0a3ed6e23845ef3 100644 (file)
@@ -52,6 +52,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_TFTP_TSIZE=y
index 70cb79531e9215a52213af10bfcd2a085bbceb56..55c71a000d002b2f33796449b585c32175426ba5 100644 (file)
@@ -74,6 +74,7 @@ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_USE_IPADDR=y
index d5c8604f70974fc1937a559888bef2fd1e5fed18..58eb4317857baa4493be631493cc36eb357db137 100644 (file)
@@ -60,6 +60,7 @@ CONFIG_ENV_IS_IN_NAND=y
 CONFIG_ENV_RANGE=0x80000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_USE_IPADDR=y
index ae8406f70de56257b16b6eb699d6fcbe2c0bee2f..3382371d40de939d87b08b60b1e7d6d539267206 100644 (file)
@@ -51,6 +51,7 @@ CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_USE_IPADDR=y
index 3c506ffb68776ffc2f8a32927c8e5539195a76be..3405e02ad347d735af619f4f6075108ad614f344 100644 (file)
@@ -50,6 +50,7 @@ CONFIG_OF_LIVE=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_ENV_IS_IN_NAND=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=1536
 CONFIG_TFTP_TSIZE=y
index c7012031c0a836ec04dd9b05257b5b571a1a7431..394d656a1260b924a72ffb96e3dea101835f4386 100644 (file)
@@ -43,6 +43,7 @@ CONFIG_OF_LIVE=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_SYS_MMC_ENV_PART=1
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=16352
 CONFIG_TFTP_TSIZE=y
index 3d1319cf812e493e42039177d2744d686eca6322..891637dee7419c44f3baf99150bbf821ff8a5f57 100644 (file)
@@ -66,6 +66,7 @@ CONFIG_ENV_RANGE=0x80000
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_USE_IPADDR=y
 CONFIG_IPADDR="192.168.10.2"
 CONFIG_USE_NETMASK=y
index 956e3a1ad75eec90a3380fcae1627f0b2dbd3744..63e75474ca713eee03a6772d66118faa15f80a98 100644 (file)
@@ -104,6 +104,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="eth0"
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_SPL_DM=y
index 0c88982f75c8e408a89ed63ab2a84f34315655a3..4e00fb4008dccd1ebac5e87828f9d90e0c50c0f3 100644 (file)
@@ -90,6 +90,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="eth0"
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_SPL_DM=y
index 22b8a334dfaf168d86b5a6a27d8fce4c21fab78e..a95edff961b2c4f3de223e430313ed25fb97cfaa 100644 (file)
@@ -99,6 +99,7 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
 CONFIG_USE_ETHPRIME=y
 CONFIG_ETHPRIME="eth0"
 CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
 CONFIG_IP_DEFRAG=y
 CONFIG_TFTP_BLOCKSIZE=4096
 CONFIG_SPL_DM=y