From 2df573e6a5d30c3f009a9cea8f5e2e11cc9710e3 Mon Sep 17 00:00:00 2001 From: Ramon Fried Date: Fri, 21 Sep 2018 13:35:46 +0300 Subject: [PATCH] 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 --- arch/arm/mach-snapdragon/Kconfig | 1 + board/qualcomm/dragonboard410c/dragonboard410c.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig index bfd99db6e2..e562d693c6 100644 --- a/arch/arm/mach-snapdragon/Kconfig +++ b/arch/arm/mach-snapdragon/Kconfig @@ -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: diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c index e8a3ed0450..b2a72bce38 100644 --- a/board/qualcomm/dragonboard410c/dragonboard410c.c +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c @@ -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: -- 2.30.2