Commit 7d48a0d5468dcb6966c338e1d5ac619cd5abd866

Authored by yang.tian
1 parent dac930e735

MA-13748 Pass BDADDR from uboot cmdline

Pass bt mac address from uboot cmdline to write
ro.boot.btmacaddr property for bluetooth hal to parse
BDADDR which is composed from ro.boot.serialno,
or it will fall back to persist property seted in init.rc.

Change-Id: If6886596c79c699b8530d3249b1cc98f19aad51f
Signed-off-by: yang.tian <yang.tian@nxp.com>

Showing 1 changed file with 11 additions and 0 deletions Side-by-side Diff

common/image-android.c
... ... @@ -125,6 +125,17 @@
125 125 serialnr.high,
126 126 serialnr.low);
127 127 strncat(commandline, newbootargs, sizeof(commandline) - strlen(commandline));
  128 +
  129 + char bd_addr[16]={0};
  130 + sprintf(bd_addr,
  131 + "%08x%08x",
  132 + serialnr.high,
  133 + serialnr.low);
  134 + sprintf(newbootargs,
  135 + " androidboot.btmacaddr=%c%c:%c%c:%c%c:%c%c:%c%c:%c%c",
  136 + bd_addr[0],bd_addr[1],bd_addr[2],bd_addr[3],bd_addr[4],bd_addr[5],
  137 + bd_addr[6],bd_addr[7],bd_addr[8],bd_addr[9],bd_addr[10],bd_addr[11]);
  138 + strncat(commandline, newbootargs, sizeof(commandline) - strlen(commandline));
128 139 #endif
129 140  
130 141 /* append soc type into bootargs */