Commit 2df573e6a5d30c3f009a9cea8f5e2e11cc9710e3

Authored by Ramon Fried
Committed by Tom Rini
1 parent 6b0861a942

db410c: serial# env using msm board serial

The serial# environment variable needs to be
defined so it will be used by fastboot as serial
for the endpoint descriptor.

Signed-off-by: Ramon Fried <ramon.fried@gmail.com>

Showing 2 changed files with 11 additions and 0 deletions Side-by-side Diff

arch/arm/mach-snapdragon/Kconfig
... ... @@ -14,6 +14,7 @@
14 14  
15 15 config TARGET_DRAGONBOARD410C
16 16 bool "96Boards Dragonboard 410C"
  17 + select BOARD_LATE_INIT
17 18 help
18 19 Support for 96Boards Dragonboard 410C. This board complies with
19 20 96Board Open Platform Specifications. Features:
board/qualcomm/dragonboard410c/dragonboard410c.c
... ... @@ -151,6 +151,16 @@
151 151 return 0;
152 152 }
153 153  
  154 +int board_late_init(void)
  155 +{
  156 + char serial[16];
  157 +
  158 + memset(serial, 0, 16);
  159 + snprintf(serial, 13, "%x", msm_board_serial());
  160 + env_set("serial#", serial);
  161 + return 0;
  162 +}
  163 +
154 164 /* Fixup of DTB for Linux Kernel
155 165 * 1. Fixup installed DRAM.
156 166 * 2. Fixup WLAN/BT Mac address: