From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 12 Jul 2024 16:34:29 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1sSHLx-0047aP-29 for lore@lore.pengutronix.de; Fri, 12 Jul 2024 16:34:29 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1sSHLx-0007k4-93; Fri, 12 Jul 2024 16:34:29 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sSHLv-0007jo-7X; Fri, 12 Jul 2024 16:34:27 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sSHLu-0091Ly-R7; Fri, 12 Jul 2024 16:34:26 +0200 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1sSHLu-00H4hc-2P; Fri, 12 Jul 2024 16:34:26 +0200 From: Ahmad Fatoum To: distrokit@pengutronix.de Date: Fri, 12 Jul 2024 16:34:22 +0200 Message-Id: <20240712143422.4069634-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [DistroKit] [PATCH] v8a: barebox: derive stable MAC address from machine ID X-BeenThere: distrokit@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: DistroKit Mailinglist List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ahmad Fatoum Sender: "DistroKit" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: distrokit-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false The i.MX ocotp driver already registers the SoC serial number, so it can be hashed into 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 --- configs/platform-v8a/barebox.config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configs/platform-v8a/barebox.config b/configs/platform-v8a/barebox.config index 6bbdd9224e1b..6e763c338f3f 100644 --- a/configs/platform-v8a/barebox.config +++ b/configs/platform-v8a/barebox.config @@ -255,7 +255,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" @@ -513,6 +513,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=y CONFIG_NET_RESOLV=y @@ -1142,6 +1143,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=y CONFIG_DIGEST_MD5_GENERIC=y CONFIG_DIGEST_SHA1_GENERIC=y @@ -1149,7 +1151,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_ARM64_CE=y CONFIG_DIGEST_SHA256_ARM64_CE=y # CONFIG_CRYPTO_KEYSTORE is not set -- 2.39.2