From: megous at megous.com <megous@megous.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] sunxi: Fix build when CONFIG_CMD_NET is disabled
Date: Sat, 9 Feb 2019 14:39:54 +0100 [thread overview]
Message-ID: <20190209133957.12713-2-megous@megous.com> (raw)
In-Reply-To: <20190209133957.12713-1-megous@megous.com>
From: Ondrej Jirman <megous@megous.com>
Signed-off-by: Ondřej Jirman <megous@megous.com>
---
board/sunxi/board.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 98bc3cd0c1..e918bdf36b 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -774,9 +774,12 @@ static void setup_environment(const void *fdt)
{
char serial_string[17] = { 0 };
unsigned int sid[4];
+#if defined CONFIG_CMD_NET
uint8_t mac_addr[6];
char ethaddr[16];
- int i, ret;
+ int i;
+#endif
+ int ret;
ret = sunxi_get_sid(sid);
if (ret == 0 && sid[0] != 0) {
@@ -801,6 +804,7 @@ static void setup_environment(const void *fdt)
if ((sid[3] & 0xffffff) == 0)
sid[3] |= 0x800000;
+#if defined CONFIG_CMD_NET
for (i = 0; i < 4; i++) {
sprintf(ethaddr, "ethernet%d", i);
if (!fdt_get_alias(fdt, ethaddr))
@@ -824,6 +828,7 @@ static void setup_environment(const void *fdt)
eth_env_set_enetaddr(ethaddr, mac_addr);
}
+#endif
if (!env_get("serial#")) {
snprintf(serial_string, sizeof(serial_string),
--
2.20.1
next prev parent reply other threads:[~2019-02-09 13:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-09 13:39 [U-Boot] [PATCH 0/4] Random small sunxi fixes megous at megous.com
2019-02-09 13:39 ` megous at megous.com [this message]
2019-02-11 12:14 ` [U-Boot] [PATCH 1/4] sunxi: Fix build when CONFIG_CMD_NET is disabled Tomas Novotny
2019-02-11 12:41 ` Ondřej Jirman
2019-02-09 13:39 ` [U-Boot] [PATCH 2/4] sunxi: Fix build when CONFIG_CMD_PXE or CONFIG_CMD_DHCP are disabled megous at megous.com
2019-02-13 17:01 ` Jagan Teki
2019-02-09 13:39 ` [U-Boot] [PATCH 3/4] lib: decode_timing_property should return -NOENT when proprty is not found megous at megous.com
2019-02-19 15:17 ` Simon Glass
2019-02-19 21:43 ` Ondřej Jirman
2019-02-09 13:39 ` [U-Boot] [PATCH 4/4] power: axp818: Fix typo in axp_set_dldo megous at megous.com
2019-02-13 17:01 ` Jagan Teki
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=20190209133957.12713-2-megous@megous.com \
--to=megous@megous.com \
--cc=u-boot@lists.denx.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 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.