diff options
-rw-r--r-- | board/ti/am335x/board.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index b144fd1821..f802657299 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -767,6 +767,16 @@ int board_late_init(void) } #endif + if (!env_get("serial#")) { + char *board_serial = env_get("board_serial"); + char *ethaddr = env_get("ethaddr"); + + if (!board_serial || !strncmp(board_serial, "unknown", 7)) + env_set("serial#", ethaddr); + else + env_set("serial#", board_serial); + } + return 0; } #endif |