diff options
Diffstat (limited to 'board/ti/am335x')
-rw-r--r-- | board/ti/am335x/board.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index f0cb1e204a..f56d17ec58 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -507,9 +507,15 @@ int board_late_init(void) safe_string[sizeof(header.name)] = 0; setenv("board_name", safe_string); - strncpy(safe_string, (char *)header.version, sizeof(header.version)); - safe_string[sizeof(header.version)] = 0; - setenv("board_rev", safe_string); + /* BeagleBone Green eeprom, board_rev: 0x1a 0x00 0x00 0x00 */ + if ( (header.version[0] == 0x1a) && (header.version[1] == 0x00) && + (header.version[2] == 0x00) && (header.version[3] == 0x00) ) { + setenv("board_rev", "BBG1"); + } else { + strncpy(safe_string, (char *)header.version, sizeof(header.version)); + safe_string[sizeof(header.version)] = 0; + setenv("board_rev", safe_string); + } #endif return 0; |