From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: distrokit@pengutronix.de
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [DistroKit] [PATCH 2/4] v7a: barebox: derive stable MAC address from machine ID
Date: Tue, 2 Jul 2024 14:28:47 +0200 [thread overview]
Message-ID: <20240702122849.4008988-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240702122849.4008988-1-a.fatoum@pengutronix.de>
Some platforms like i.MX6 and STM32MP1 currently hash their serial
number to derive a machine ID. barebox can also derive a MAC address
this way, so enable that option, so boards that have no proper MAC
address fused get assigned a MAC address that stays constant over
reboots.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
configs/platform-v7a/barebox-mx6.config | 3 ++-
configs/platform-v7a/barebox-mx6.config.diff | 2 ++
configs/platform-v7a/barebox-stm32mp.config | 6 ++++--
configs/platform-v7a/barebox-stm32mp.config.diff | 4 ++++
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/configs/platform-v7a/barebox-mx6.config b/configs/platform-v7a/barebox-mx6.config
index 890a32825a1e..945b4a903463 100644
--- a/configs/platform-v7a/barebox-mx6.config
+++ b/configs/platform-v7a/barebox-mx6.config
@@ -310,7 +310,7 @@ CONFIG_STATE=y
# CONFIG_STATE_BACKWARD_COMPATIBLE is not set
CONFIG_BOOTCHOOSER=y
CONFIG_RESET_SOURCE=y
-# CONFIG_MACHINE_ID is not set
+CONFIG_MACHINE_ID=y
# CONFIG_SYSTEMD_OF_WATCHDOG is not set
CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
@@ -571,6 +571,7 @@ CONFIG_CMD_STATE=y
# end of Commands
CONFIG_NET=y
+CONFIG_NET_ETHADDR_FROM_MACHINE_ID=y
CONFIG_NET_NFS=y
# CONFIG_NET_NETCONSOLE is not set
CONFIG_NET_RESOLV=y
diff --git a/configs/platform-v7a/barebox-mx6.config.diff b/configs/platform-v7a/barebox-mx6.config.diff
index b6aab074014e..af14a2eed749 100644
--- a/configs/platform-v7a/barebox-mx6.config.diff
+++ b/configs/platform-v7a/barebox-mx6.config.diff
@@ -101,6 +101,7 @@ CONFIG_KEYBOARD_GPIO=y
CONFIG_LIBSCAN=y
CONFIG_LIBUBIGEN=y
CONFIG_LODEPNG=y
+CONFIG_MACHINE_ID=y
# CONFIG_MACH_AC_SXB is not set
# CONFIG_MACH_ADVANTECH_ROM_742X is not set
# CONFIG_MACH_CCMX51 is not set
@@ -202,6 +203,7 @@ CONFIG_NAND_ECC_HW_SYNDROME=y
CONFIG_NAND_IMX=y
CONFIG_NAND_MXS=y
CONFIG_NAND_NEED_EXEC_OP=y
+CONFIG_NET_ETHADDR_FROM_MACHINE_ID=y
CONFIG_NVMEM=y
# CONFIG_NVMEM_REBOOT_MODE is not set
# CONFIG_NVMEM_RMEM is not set
diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config
index f0c77c0593f9..898d8ed979c3 100644
--- a/configs/platform-v7a/barebox-stm32mp.config
+++ b/configs/platform-v7a/barebox-stm32mp.config
@@ -207,7 +207,7 @@ CONFIG_STATE=y
# CONFIG_STATE_BACKWARD_COMPATIBLE is not set
CONFIG_BOOTCHOOSER=y
CONFIG_RESET_SOURCE=y
-# CONFIG_MACHINE_ID is not set
+CONFIG_MACHINE_ID=y
# CONFIG_SYSTEMD_OF_WATCHDOG is not set
CONFIG_EXTERNAL_DTS_FRAGMENTS="${PTXDIST_PLATFORMCONFIGDIR}/dts/bootstate.dtsi"
@@ -462,6 +462,7 @@ CONFIG_CMD_STATE=y
# end of Commands
CONFIG_NET=y
+CONFIG_NET_ETHADDR_FROM_MACHINE_ID=y
# CONFIG_NET_NFS is not set
CONFIG_NET_NETCONSOLE=y
CONFIG_NET_RESOLV=y
@@ -980,6 +981,7 @@ CONFIG_HAVE_DIGEST_MD5=y
CONFIG_HAVE_DIGEST_SHA1=y
CONFIG_HAVE_DIGEST_SHA224=y
CONFIG_HAVE_DIGEST_SHA256=y
+CONFIG_HAVE_DIGEST_HMAC=y
# CONFIG_DIGEST_CRC32_GENERIC is not set
CONFIG_DIGEST_MD5_GENERIC=y
CONFIG_DIGEST_SHA1_GENERIC=y
@@ -987,7 +989,7 @@ CONFIG_DIGEST_SHA1_GENERIC=y
# CONFIG_DIGEST_SHA256_GENERIC is not set
# CONFIG_DIGEST_SHA384_GENERIC is not set
# CONFIG_DIGEST_SHA512_GENERIC is not set
-# CONFIG_DIGEST_HMAC_GENERIC is not set
+CONFIG_DIGEST_HMAC_GENERIC=y
# CONFIG_DIGEST_SHA1_ARM is not set
CONFIG_DIGEST_SHA256_ARM=y
# CONFIG_CRYPTO_KEYSTORE is not set
diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff
index 566de8098fcb..1d31bc529248 100644
--- a/configs/platform-v7a/barebox-stm32mp.config.diff
+++ b/configs/platform-v7a/barebox-stm32mp.config.diff
@@ -46,6 +46,7 @@ CONFIG_CONSOLE_ACTIVATE_NONE=y
CONFIG_CRC8=y
# CONFIG_DEBUG_PBL is not set
CONFIG_DEFAULT_LOGLEVEL=7
+CONFIG_DIGEST_HMAC_GENERIC=y
# CONFIG_DRIVER_CFI is undefined
CONFIG_DRIVER_NET_DESIGNWARE_EQOS=y
CONFIG_DRIVER_NET_DESIGNWARE_STM32=y
@@ -61,6 +62,7 @@ CONFIG_EEPROM_AT24=y
CONFIG_GENERIC_PHY=y
# CONFIG_GPIO_74164 is undefined
# CONFIG_GPIO_RASPBERRYPI_EXP is undefined
+CONFIG_HAVE_DIGEST_HMAC=y
CONFIG_HAVE_OPTEE=y
CONFIG_HWRNG_STM32=y
# CONFIG_HW_RANDOM_BCM2835 is undefined
@@ -74,6 +76,7 @@ CONFIG_IDR=y
CONFIG_LED_PWM=y
# CONFIG_LED_TRIGGERS is not set
# CONFIG_LIBFDT is undefined
+CONFIG_MACHINE_ID=y
CONFIG_MACH_LXA_MC1=y
# CONFIG_MACH_PHYTEC_PHYCORE_STM32MP1 is not set
# CONFIG_MACH_PROTONIC_STM32MP1 is not set
@@ -114,6 +117,7 @@ CONFIG_MICREL_PHY=y
# CONFIG_MTD_UBI is undefined
# CONFIG_MTD_WRITE is undefined
# CONFIG_NAND is undefined
+CONFIG_NET_ETHADDR_FROM_MACHINE_ID=y
CONFIG_NET_NETCONSOLE=y
# CONFIG_NET_NFS is not set
# CONFIG_NET_USB is not set
--
2.39.2
next prev parent reply other threads:[~2024-07-02 12:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 12:28 [DistroKit] [PATCH 1/4] v7a: barebox: update to v2024.07.0 Ahmad Fatoum
2024-07-02 12:28 ` Ahmad Fatoum [this message]
2024-07-02 12:28 ` [DistroKit] [PATCH 3/4] v7a: images: stm32mp: add support for building SCMI enabled images Ahmad Fatoum
2024-07-02 12:28 ` [DistroKit] [PATCH 4/4] v7a: lxa-mc1: add new image for -scmi variant Ahmad Fatoum
2024-07-03 9:13 ` [DistroKit] [PATCH 1/4] v7a: barebox: update to v2024.07.0 Robert Schwebel
2024-07-03 9:44 ` Ahmad Fatoum
2024-07-03 9:57 ` Robert Schwebel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240702122849.4008988-2-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=distrokit@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox