db410c: serial# env using msm board serial
authorRamon Fried <ramon.fried@gmail.com>
Fri, 21 Sep 2018 10:35:46 +0000 (13:35 +0300)
committerTom Rini <trini@konsulko.com>
Sun, 30 Sep 2018 17:00:35 +0000 (13:00 -0400)
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>
arch/arm/mach-snapdragon/Kconfig
board/qualcomm/dragonboard410c/dragonboard410c.c

index bfd99db6e271ae901dc50dc859ab06da589d0a6c..e562d693c6b3d55a565744236c3aa884474d3d07 100644 (file)
@@ -14,6 +14,7 @@ choice
 
 config TARGET_DRAGONBOARD410C
        bool "96Boards Dragonboard 410C"
+       select BOARD_LATE_INIT
        help
          Support for 96Boards Dragonboard 410C. This board complies with
          96Board Open Platform Specifications. Features:
index e8a3ed0450343b0530563dafdcd6959e4a8095ab..b2a72bce38eb5355846352bb5d4e41a9668ffd70 100644 (file)
@@ -151,6 +151,16 @@ int board_init(void)
        return 0;
 }
 
+int board_late_init(void)
+{
+       char serial[16];
+
+       memset(serial, 0, 16);
+       snprintf(serial, 13, "%x", msm_board_serial());
+       env_set("serial#", serial);
+       return 0;
+}
+
 /* Fixup of DTB for Linux Kernel
  * 1. Fixup installed DRAM.
  * 2. Fixup WLAN/BT Mac address: