All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tim Harvey <tharvey@gateworks.com>
To: Stefano Babic <sbabic@denx.de>,
	Fabio Estevam <festevam@gmail.com>,
	"NXP i . MX U-Boot Team" <uboot-imx@nxp.com>,
	u-boot@lists.denx.de
Cc: Tim Harvey <tharvey@gateworks.com>
Subject: [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial#
Date: Wed, 18 Aug 2021 15:24:28 -0700	[thread overview]
Message-ID: <20210818222431.13862-2-tharvey@gateworks.com> (raw)
In-Reply-To: <20210818222431.13862-1-tharvey@gateworks.com>

Do not overwrite existing serial# env to avoid:
 ## Error: Can't overwrite "serial#"
 ## Error inserting "serial#" variable, errno=1

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
v2: added missing error to commit log
---
 board/gateworks/venice/imx8mm_venice.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/board/gateworks/venice/imx8mm_venice.c b/board/gateworks/venice/imx8mm_venice.c
index 2a97d55d32..46f4bff925 100644
--- a/board/gateworks/venice/imx8mm_venice.c
+++ b/board/gateworks/venice/imx8mm_venice.c
@@ -114,7 +114,8 @@ int board_late_init(void)
 	led_default_state();
 
 	/* Set board serial/model */
-	env_set_ulong("serial#", gsc_get_serial());
+	if (!env_get("serial#"))
+		env_set_ulong("serial#", gsc_get_serial());
 	env_set("model", gsc_get_model());
 
 	/* Set fdt_file vars */
-- 
2.17.1


  reply	other threads:[~2021-08-18 22:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-18 22:24 [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Tim Harvey
2021-08-18 22:24 ` Tim Harvey [this message]
2021-10-07 14:12   ` [PATCH v2 2/5] board: gateworks: venice: do not overwrite serial# sbabic
2021-08-18 22:24 ` [PATCH v2 3/5] arm: dts: imx8mm-venice-gw700x: fix mp5416 pmic config Tim Harvey
2021-10-07 14:13   ` sbabic
2021-08-18 22:24 ` [PATCH v2 4/5] board: gateworks: venice: update thermal temp thresholds per cpu grade Tim Harvey
2021-10-07 14:14   ` sbabic
2021-08-18 22:24 ` [PATCH v2 5/5] arm: dts: imx8mm-venice*: remove thermal zone overrides Tim Harvey
2021-10-07 14:13   ` sbabic
2021-08-23 18:04 ` [PATCH v2 1/5] board: gateworks: venice: display hwmon details by default Fabio Estevam
2021-10-07 14:13 ` sbabic

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=20210818222431.13862-2-tharvey@gateworks.com \
    --to=tharvey@gateworks.com \
    --cc=festevam@gmail.com \
    --cc=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.